org.specrunner.util
Class UtilString

java.lang.Object
  extended by org.specrunner.util.UtilString

public final class UtilString
extends Object

Utility String class.

Author:
Thiago Santos

Method Summary
static String camelCase(String text)
          Camel case characters, as Java attributes or methods.
static String camelCase(String text, boolean changeFirst)
          Normalize a string using camel case rules.
static String clean(String str)
          Remove all Latin characters.
static String normalize(String str)
          Normalize a string, removing white spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

normalize

public static String normalize(String str)
Normalize a string, removing white spaces.

Parameters:
str - The original string.
Returns:
The normalized version.

camelCase

public static String camelCase(String text)
Camel case characters, as Java attributes or methods.

Parameters:
text - The text to change.
Returns:
The text changed.

camelCase

public static String camelCase(String text,
                               boolean changeFirst)
Normalize a string using camel case rules.

Parameters:
text - The text to be normalized.
changeFirst - Flag to upper first character also.
Returns:
The normalized string.

clean

public static String clean(String str)
Remove all Latin characters.

Parameters:
str - The string to be normalized.
Returns:
The cleaned string.


Copyright © 2014. All rights reserved.