Package com.rvandoosselaer.jmeutils.util
Class StringUtils
- java.lang.Object
-
- com.rvandoosselaer.jmeutils.util.StringUtils
-
public class StringUtils extends java.lang.ObjectUtility class for Strings.
-
-
Constructor Summary
Constructors Constructor Description StringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringmax(java.lang.String string, int max)Returns the given string, with a maximum ofmaxcharacters.static java.lang.StringtoCamelCase(java.lang.String string)Converts a string to camelcase.
-
-
-
Method Detail
-
toCamelCase
public static java.lang.String toCamelCase(java.lang.String string)
Converts a string to camelcase. toCamelCase(null) : "" toCamelCase("hello") : "hello" toCamelCase("my name is Remy") : "myNameIsRemy" toCamelCase("I am FINE") : "iAmFine" toCamelCase(" "): ""- Parameters:
string- the input string- Returns:
- camelcase representation of the given string
-
max
public static java.lang.String max(java.lang.String string, int max)Returns the given string, with a maximum ofmaxcharacters. Characters after themaxwill be stripped.- Parameters:
string- the input stringmax- the maximum allowed length of the output string- Returns:
- stripped string
-
-