ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Converting first char in a string to lower case
Date Fri, 15 Oct 2004 10:41:21 GMT
Thanks for pointing that out :)
Library dependency to "old" rhino is described in the manual.

Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Ben Gill [mailto:Ben.Gill@t-mobile.co.uk]
> Gesendet am: Freitag, 15. Oktober 2004 11:59
> An: Ant Users List
> Betreff: RE: Converting first char in a string to lower case
> 
> Excellent, Thanks Ivan, this works a treat!!
> 
> I had to use BSF 2.3.0 and the js.jar from Rhino15R3.zip 
> (later versions
> don't work!)
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
> 
>     <property name="prop" value="MixedContent"/>
> 
>     <scriptdef name="lc" language="javascript">
>         <attribute name="property"/>
>         <attribute name="value"/>
>         project.setNewProperty(attributes.get("property"),
> attributes.get("value").toLowerCase());
>     </scriptdef>
> 
>     <scriptdef name="uc" language="javascript">
>         <attribute name="property"/>
>         <attribute name="value"/>
>         project.setNewProperty(attributes.get("property"),
> attributes.get("value").toUpperCase());
>     </scriptdef>
> 
>     <lc property="lcProp" value="${prop}"/>
>     <uc property="ucProp" value="${prop}"/>
> 
>     <echo>
>       prop   = ${prop}
>       lcProp = ${lcProp}
>       ucProp = ${ucProp}
>     </echo>
> 
> </project>
> 
> Regards
> 
> 
> 
> -----Original Message-----
> From: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com] 
> Sent: 15 October 2004 10:23
> To: Ant Users List
> Subject: Re: Converting first char in a string to lower case
> 
> Hello,
> I think that this is possible <script> tasks. See here
> for a similar sample:
> http://marc.theaimsgroup.com/?l=ant-user&m=109156218522906&w=2
> --- Ben Gill <Ben.Gill@t-mobile.co.uk> wrote:
> 
> > Hi,
> > 
> >  
> > 
> > I have a string 'Foo' that I want to change to
> > 'foo'.  Is there any way
> > of doing this in ant?
> > 
> >  
> > 
> > I have looked at the regex stuff but I don't think
> > that will do the
> > job...
> > 
> >  
> > 
> > Does anyone have any other ideas?
> > 
> > 
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> ---------------------------------------------------------------------
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message