On 8/22/01 5:23 PM, "Daniel Rall" <[EMAIL PROTECTED]> 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.
You should probably deprecate it, I don't think anyone else is using it but
you never know. I would deprecate with a message of using this method in
combination with firstLetterCaps(s) to arrive at the same end result. The
method name is definitely a misnomer and we can get rid of it next release.
> 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();
> }
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons