ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 33253] a wrapper for the java.lang. String class to modify properties
Date Wed, 14 May 2008 00:54:26 GMT

--- Comment #8 from Colm Smyth <>  2008-05-13 17:54:26 PST ---
The feature proposal in principle seems sound. I would suggest changing the
parameter names to "argN" to be compatible with the existing Ant equals
feature, and the "src" attribute to "value".

However when you introduce substring() and length(), you also introduce the
requirement to do integer arithmetic on properties, using (say) an "evaluate"
task as follows:

<string property="fileNameLength" method="length" src="${fileName}" />
<evaluate property="fileNameLengthMinusExtension"
expression="${fileNameLength}-3" />
<string property="fileExtension" method="substring" src="{$fileName}"
param1="${fileNameLengthMinusExtension}" />

But when you consider the effort required to deliver these features, and the
effort to code and maintain the tasks in Ant XML, I wonder if isn't a better answer?

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message