ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bender, Christopher" <Christopher.Ben...@tdsecurities.com>
Subject RE: How to Split a String in Ant?
Date Thu, 30 Oct 2003 15:57:30 GMT
you can use the <script> task and write your own routine.  This is what I have done.
 I wonder if there is anything easier tho.

Chris

-----Original Message-----
From: Weiqi Gao [mailto:weiqigao@networkusa.net]
Sent: Thursday, October 30, 2003 10:56 AM
To: user@ant.apache.org
Subject: How to Split a String in Ant?


Hi,

I'm looking for a way to split a string that's passed in as a property, 
but I couldn't find the task that will allow me to do this.

My build file will be fed properties like "something_something_15", and 
I want a property generated that contains the string "15".  If the last 
part after the underscore is not a number, I want the property generated 
to have a value "9999".

Any pointers are welcome.

TIA
--
Weiqi Gao
weiqigao@networkusa.net
http://www.weiqigao.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
View raw message