> > I'm trying to remove spaces from a string and use it > > as a property. Any clue why the following won't work: > > > > <project name="test" default="default" > > > <property name="myString" value="String With Spaces"/> > > > > <target name="default"> > > <property name="stringNoSpace" value="${string::trim(myString)}"/> > > <echo message="${stringNoSpace}"/> > > </target> > > > > </project> > Eric- > property is immutable by definition so you cannot 'reset' it > as you are attempting to do here > 2 choices:
I think not. A, properties *are* mutable; I do it all the time. B, he's not assigning back to the original property in any case, he's assigning the value to a new property. No, his problem is that he's trying to use a funtion for a purpose other than it's intended one. Trim does not remove spaces from the interior of a string, only the ends. I believe there is a function to remove the spaces, probably called "replace" or something like that. Brad ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users