I did a little try ... and it works (for me):
<project name="myProject" basedir="." default="foo">
<property name="myprop" value="foo" />
<target name="foo">
<!-- Using Javascript functions to convert the string -->
<script language="javascript"> <![CDATA[
// getting the value
lowercaseValue = myProject.getProperty("myprop");
// the first character
ch = lowercaseValue.substring(0,1);
// the rest of the value
rest = lowercaseValue.substring(1);
// convert first character to uppercase
up = ch.toUpperCase();
// concatenate the uppercase with the rest
uppercaseValue = up + rest;
// store the result in a new property
myProject.setProperty("Myprop",uppercaseValue);
]]> </script>
<!-- Display the values -->
<echo>myprop=${myprop}</echo>
<echo>Myprop=${Myprop}</echo>
</target>
</project>
Jan ... Mat�rne :-)
> -----Urspr�ngliche Nachricht-----
> Von: jan casteels [mailto:[EMAIL PROTECTED]
> Gesendet am: Donnerstag, 28. November 2002 04:13
> An: [EMAIL PROTECTED]
> Betreff: First char Uppercase
>
>
> Hi,
>
> I need to change the first char of a property to uppercase.
>
> foo needs to be changed to Foo where foo was stored in a property.
>
> How can I do this?
>
>
> Jan
>
>
>
>
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>