|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtheque.utils.StringUtils
public final class StringUtils
This class provides utilities function to manipulate String's object.
Field Summary | |
---|---|
static String |
EMPTY_STRING
|
Method Summary | |
---|---|
static String |
delete(String string,
CharSequence toDelete)
|
static String |
delete(String string,
Object... toDeletes)
|
static boolean |
endsWithOneOf(String value,
String... ends)
Test if the String value ends with one of the specified ends. |
static boolean |
isEmpty(CharSequence string)
Test if a string is empty or not. |
static boolean |
isEmpty(String[] strings)
Test if an array of String is empty. |
static boolean |
isNotEmpty(CharSequence string)
Return true if the string is not empty. |
static boolean |
isNotEmpty(String[] strings)
Test if an array of string is not empty. |
static boolean |
isStringSurroundedWith(CharSequence str,
char c)
Indicate if the string is surrounded by the character c. |
static String |
removeHTMLEntities(String htmlString)
Remove the HTML entities of a string. |
static void |
removeLastSpace(StringBuilder builder)
Remove the last space in the StringBuilder. |
static String |
removeNumbers(CharSequence value)
Remove all numbers of the given string. |
static String |
removeSurroundedChars(String str)
Remove the first and the test chars. |
static String |
removeUnicode(String value)
Remove the unicode characters from a string. |
static String |
setFirstLetterOnlyUpper(String word)
Set the first letter of the String to upper. |
static String |
setFirstLetterUpper(String word)
Set the first letter of the String to upper. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EMPTY_STRING
Method Detail |
---|
public static String setFirstLetterOnlyUpper(String word)
word
- The string to modify.
public static String setFirstLetterUpper(String word)
word
- The string to modify.
public static boolean isEmpty(CharSequence string)
string
- The string to test.
public static boolean isNotEmpty(CharSequence string)
string
- The string to test.
public static void removeLastSpace(StringBuilder builder)
builder
- The builder we must modifypublic static String removeHTMLEntities(String htmlString)
htmlString
- The string to clear.
public static boolean isStringSurroundedWith(CharSequence str, char c)
str
- The string to test.c
- The char to test.
public static String removeSurroundedChars(String str)
str
- The string to edit.
public static String removeUnicode(String value)
value
- The string to clean.
public static boolean endsWithOneOf(String value, String... ends)
value
- The String value to test.ends
- The possible ends.
public static boolean isEmpty(String[] strings)
strings
- The array to test.
public static boolean isNotEmpty(String[] strings)
strings
- The array of Strings to test.
isEmpty(String[] strings);
public static String removeNumbers(CharSequence value)
value
- The string.
public static String delete(String string, Object... toDeletes)
public static String delete(String string, CharSequence toDelete)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |