ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shatzer, Larry" <Larry.Shat...@Spirent.com>
Subject [SUBMIT] optional task <propertyformatter>
Date Fri, 05 Sep 2003 02:06:13 GMT
Optional Task Proposal <propertyformatter>

Bug#22889 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22889) got me
thinking about this. At first I knocked up a quick change to allow uppercase
and lowercase with a format attribute for <property>. Then I was thinking, a
better place for this is in it's own task. So I decided to write it as it's
own task. I used the Jakarta Commons Lang project for the StringUtils and
WordUtils, since it offered a few methods that I wanted. Such as swapcase,
without re-inventing the wheel.

I figure this is best left as a optional task, since it has the requirement
on Jakarta Commons Lang. I have not yet created any tests for this, yet, but
plan on it. I also plan on fleshing out the documentation more, to include
more examples. There are quite a few other methods that StringUtils and
WordUtils offer that I would like to include, but will take a bit more time
thinking out how I should implement them.

Currently this tasks implements the following "formats": "trim", "strip",
"deletewhitespace", "chomp", "chop", "uppercase", "lowercase", "swapcase",
"capitalize", "uncapitalize", "reverse", "catitalizewords",
"capipalizewordsfully", "uncapitalizewords".

For a more detailed explanation for what each of these "formats" do, see the
documentation, and the Jakarta Commons Lang project for StringUtils and
WordUtils.

Just a note, I am not a Java programmer normally, so any hints to my code
will be appreciated. Since this all wrappers Jakarta Commons Lang stuff, all
the heavy lifted is done there. Also, I hope I got the dependency checking
right in build.xml.

All constructive criticism welcome.

-- Larry


Mime
View raw message