Package org.ow2.clif.util
Class StringHelper
- java.lang.Object
-
- org.ow2.clif.util.StringHelper
-
public abstract class StringHelper extends java.lang.ObjectMiscellaneous String utilities- Author:
- Fabrice Rivart, Bruno Dillenseger
-
-
Constructor Summary
Constructors Constructor Description StringHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringconvertJavaIdentifier(java.lang.String string)Returns a valid Java identifier by removing non valid character.static java.lang.StringescapeProperty(java.lang.String prop)Java Properties values and keys need escaping when storing them to conform to the Properties.load() specification.static booleanisEnabled(java.lang.String value)Checks if the given String is one among "true", "yes", "on" (ignoring case) or "1".static booleanisNullOrEmpty(java.lang.String value)
-
-
-
Method Detail
-
convertJavaIdentifier
public static java.lang.String convertJavaIdentifier(java.lang.String string)
Returns a valid Java identifier by removing non valid character.- Parameters:
string- string to convert into a valid Java identifier- Returns:
- a valid Java identifier
-
escapeProperty
public static java.lang.String escapeProperty(java.lang.String prop)
Java Properties values and keys need escaping when storing them to conform to the Properties.load() specification.- Parameters:
prop- a property key or value to escape- Returns:
- the escaped key or value ready for storing
-
isEnabled
public static boolean isEnabled(java.lang.String value)
Checks if the given String is one among "true", "yes", "on" (ignoring case) or "1".- Parameters:
value- the string to check- Returns:
- true if value equals "true", "yes", "on" (ignoring case) or "1"; false otherwise.
-
isNullOrEmpty
public static boolean isNullOrEmpty(java.lang.String value)
-
-