|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jaulp.string.StringUtils
public final class StringUtils
Utility class for the use of String object.
Constructor Summary | |
---|---|
StringUtils()
|
Method Summary | |
---|---|
static java.lang.String |
convertCharsToUnicodeChars(java.lang.String s,
boolean toLowerCase)
Converts all characters from the given String to unicodes characters encoded like \uxxxx. |
static byte[] |
convertToBytearray(char[] source)
Converts the given chararray to a bytearray. |
static java.lang.String |
getAttributName(java.lang.String name)
Gets the Attribut-name without brackets. |
static java.lang.String |
getIndex(java.lang.String name)
Gets the first index from the brackets. |
static java.lang.String |
getItemNumber(java.lang.String name)
Gets the ItemNumber from the String name. |
static java.lang.String |
getStringAfterUnderscore(java.lang.String element)
The Method getStringAfterUnderscore(String) gets the substring after the first underscore. |
static java.lang.String |
getStringBeforeUnderscore(java.lang.String element)
The Method getStringBeforeUnderscore(String) gets the substring before the first underscore. |
static boolean |
isNullOrEmpty(java.lang.String str)
The method isEmpty(String) checks if the given String is empty or null. |
static boolean |
isNumber(java.lang.String testString)
Checks if the given String is an Number. |
static java.lang.String |
putQuotesToString(java.lang.String s)
Puts to the given String at the start and end quotes. |
static java.lang.String |
readLine(java.lang.String stringWithCarriageReturns)
Reads the given String till it finds a carriage return and returns it. |
static java.lang.String[] |
removeEmptyString(java.lang.String[] words)
Removes empty Strings from the given string array and gives it back. |
static java.lang.String |
removeQuotesFromString(java.lang.String s)
Removes from the given String the first and the last character. |
static java.lang.String |
replaceAll(java.lang.String original,
java.lang.String findString,
java.lang.String replaceWith)
Replaces all occurrences of a String within another String. |
static java.lang.String |
setFirstCharacterToUpperCase(java.lang.String fieldName)
Sets the first character from the given string to upper case and returns it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtils()
Method Detail |
---|
public static final java.lang.String getItemNumber(java.lang.String name)
name
- the name
public static final java.lang.String getAttributName(java.lang.String name)
name
- The name with brackets.
public static final java.lang.String getIndex(java.lang.String name)
name
- The name from the Attribute
public static final java.lang.String getStringBeforeUnderscore(java.lang.String element)
element
- The element to get the substing.
public static final java.lang.String getStringAfterUnderscore(java.lang.String element)
element
- The element to get the substing.
public static final boolean isNullOrEmpty(java.lang.String str)
str
- The String to check.
public static final java.lang.String replaceAll(java.lang.String original, java.lang.String findString, java.lang.String replaceWith)
original
- The String to search.findString
- The search pattern.replaceWith
- Replace with that String.
public static final java.lang.String readLine(java.lang.String stringWithCarriageReturns)
stringWithCarriageReturns
- The String.
public static final boolean isNumber(java.lang.String testString)
testString
- The String to check.
public static final java.lang.String removeQuotesFromString(java.lang.String s)
s
- The String to handle.
public static final java.lang.String putQuotesToString(java.lang.String s)
s
- The String to handle.
public static final byte[] convertToBytearray(char[] source)
source
- the source.
public static final java.lang.String setFirstCharacterToUpperCase(java.lang.String fieldName)
fieldName
- The String to modify.
public static java.lang.String[] removeEmptyString(java.lang.String[] words)
words
- The string array to remove empty strings.
public static java.lang.String convertCharsToUnicodeChars(java.lang.String s, boolean toLowerCase)
s
- The String to convert.toLowerCase
- If true the letters from the unicode characters are lower
case.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |