To butt my nose in again, this method seems to be far too specific. I know
nothing about its use, but it just seems to do:
capitalize(replace(str,"_",""));
Bay
On 22 Aug 2001, Daniel Rall wrote:
> This implementation of removeUnderScores does *way* too much. In
> addition to doing what its name indicates, it also changes the case of
> the name parts. It looks like this was once used in Torque (but no
> longer). I'd like to bring this implementation in line with the name,
> unless anyone has a reason why I shouldn't. I would make it look just
> like the Commons Util version of the same name.
>
> static public String removeUnderScores (String data)
> {
> String temp = null;
> StringBuffer out = new StringBuffer();
> temp = data;
>
> StringTokenizer st = new StringTokenizer(temp, "_");
>
> while (st.hasMoreTokens())
> {
> String element = (String) st.nextElement();
> out.append ( firstLetterCaps(element));
> }//while
>
> return out.toString();
> }
>