commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ASHWIN Suresh <a.sur...@sigmatel.net.ma>
Subject RE: [lang] new functionality in StringUtils and ArrayUtils - prop osal 01
Date Tue, 25 Nov 2003 00:42:37 GMT


-----Original Message-----
From: Gary Gregory [mailto:ggregory@seagullsw.com]

>   StringUtils.flank(String flankee, String flank)
>   StringUtils.flank(String flankee, char flank)

> I am not fond of the word "flank", it is not part of my string
manipulation
vocabulary, maybe it is a Perl thing? I think "wrap" or your other "enclose"
is *much* better for things like that.

[Ash]
I proposed the term "flank" simply because the concept is that of flanking,
and 
I don't know if it has been used in any string manip jargon. Wrap already
has
a specific significance, and I am trying to get a fine distinction between
"flank" and "enclose".




>   * StringUtils.flank("", *)        = *

This one does not seem quite right:

StringUtils.flank("", "x") = "x" 

> Should it not be = "xx"?

[Ash]
Sorry, yes, it should be "xx". Mea culpa.



>   /**
>    * <pre>
>    * StringUtils.doubleQuote("Now is the time...") = "Now is the time..."
>    * </pre>
>    */
>   StringUtils.doubleQuote(String quotee)

> The edge cases are not specified in the above. An @see could also do be
added to avoid duplicating the edge case docs.

>   StringUtils.lead(String leadee, String leadChar)

hmmm... "abc" + "zz" = "zzabc"

[Ash]
Because "abc" is 'lead' by "zz".


> Unless you want to handle edge cases specifically this seems over the
top...

Gary


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


Mime
View raw message