ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <skal...@oksystem.cz>
Subject RE: UpperCase or similar task
Date Tue, 25 May 2004 09:16:13 GMT
Oh, good idea - such a simple :)
	thanx very much

	Milan

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Tuesday, May 25, 2004 11:10 AM
To: user@ant.apache.org
Subject: RE: UpperCase or similar task

There is no task.

But you can use the java.lang.String.toUpperCase() method:

    <scriptdef name="uc" language="javascript">
        <attribute name="property"/>
        <attribute name="value"/>
        project.setNewProperty(attributes.get("property"),
attributes.get("value").toUpperCase());
    </scriptdef>

    <uc property="one" value="one"/>
    <echo>one = ${one}</echo>

    <uc property="one" value="another"/>
    <echo>one = ${one}</echo>

    <uc property="two" value="Two"/>
    <echo>two = ${two}</echo>

[echo] one = ONE
[echo] one = ONE   <----- properties are immutable (therefore use of
set_New_Property() )
[echo] two = TWO


Jan

> -----Original Message-----
> From: skalsky@oksystem.cz [mailto:skalsky@oksystem.cz]
> Sent: Tuesday, May 25, 2004 10:53 AM
> To: user@ant.apache.org
> Subject: UpperCase or similar task
> 
> 
> Hello there,
> 	I have a problem with strings in ANT. Is there any task 
> to make upperCase (or lowerCase) of string in ANT ? I can't 
> find anything in the apache.org :(
> 
> 	Thanx 4 your help.
> 		Milan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message