blob: 2ad31b8772f80d64c30cc240a895b09301950d25 [file] [log] [blame]
package org.qi4j.tools.shell;
public class StringUtils
{
private StringUtils()
{
}
public static String camelCase( String text, boolean firstUpper )
{
StringBuilder builder = new StringBuilder( text.length() );
boolean initial = firstUpper;
for( int i = 0; i < text.length(); i++ )
{
char ch = text.charAt( i );
if( initial )
{
ch = Character.toUpperCase( ch );
initial = false;
}
if( ch != ' ' )
{
builder.append( ch );
}
else
{
initial = true;
}
}
return builder.toString();
}
}