commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13367] - StringUtil enhancement
Date Thu, 16 Jan 2003 23:47:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13367>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13367

StringUtil enhancement





------- Additional Comments From tvj@pobox.com  2003-01-16 23:47 -------
Note that the docs for trim do NOT specify that   trim("") == null

What's really missing is my most-used utility method:

  clean(str, defaultValue)

which returns defaultValue if str is null or becomes null after trimming.  Kinda like defaltString(trim(str),
defaultValue) but much easier to type.

Also, how does strip differ from these?  Just in its handling of control characters?

The docs on all these are vague.  It also seems like some refactoring would be appropriate
to get the desired functionality.  Personally, I find it hard to remember the difference between
trim and clean without looking at the javadocs.

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message