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:52:52 GMT
I imagine you meant "lead" and "trail".
I agree, one might as well propose "append" and "prepend" in their place.
However, I suggest "lead" and "trail" since they are commonly used in such
parlance as 
"leading dots ...", or "trailing dashes ..." or the like.
But well, append and prepend could be voted for as well.

Ash



-----Original Message-----
From: Charles Hudak [mailto:CHudak@arrowheadgrp.com]
Sent: Tuesday, November 25, 2003 00:51

Oh, and by the way, the method signature would probably look like this:

public String append(String base, String suffix){...}
public String prepend(String base, String prefix){...}

-----Original Message-----
From: Charles Hudak [mailto:CHudak@arrowheadgrp.com]

The ideas of 'flank' and 'lead' are better suggested through the use of the
terms "append" and "prepend".

When you 'flank' "abc" with "def" you are appending the string "abc" with
"def"
StringUtils.append("abc", "def"); //-->"abcdef"

When you 'lead' "abc" with "def" you are prepending the string "def" to
"abc"
StringUtils.prepend("abc", "def"); //-->"defabc"



---------------------------------------------------------------------
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