|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.lxtreme.ols.util.StringUtils
public final class StringUtils
Provides some common string utilities.
Method Summary | |
---|---|
static String |
integerToBinString(int aValue,
int aFieldWidth)
converts an integer to a bin string with leading zeros |
static String |
integerToHexString(int aValue,
int aFieldWidth)
converts an integer to a hex string with leading zeros |
static boolean |
isEmpty(String aValue)
Returns whether the given string is actually empty, meaning null or an empty string. |
static String[] |
tokenize(String aInput,
String aDelimiters)
Tokenizes a given input stream and breaks it into parts on the given delimiters. |
static String[] |
tokenizeQuotedStrings(String aInput,
String aDelimiters)
Tokenizes a given input stream and breaks it into parts on the given delimiters. |
static String |
unquote(String aInput)
Removes all double quotes from the given input. |
static String |
unquote(String aInput,
char aQuoteChar)
Removes all quotes, denoted by the given character, from the given input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String integerToBinString(int aValue, int aFieldWidth)
aValue
- integer value for conversionaFieldWidth
- number of charakters in field
public static String integerToHexString(int aValue, int aFieldWidth)
aValue
- integer value for conversionaFieldWidth
- number of charakters in field
public static boolean isEmpty(String aValue)
null
or an empty string.
aValue
- the string value to check for "emptyness", can be
null
.
true
if the given string is empty, false
otherwise.public static String[] tokenize(String aInput, String aDelimiters)
aInput
- the input string to tokenize, can be null
;aDelimiters
- the delimiter characters to break the given input on,
cannot be null
.
null
if
the original input was null
.public static String[] tokenizeQuotedStrings(String aInput, String aDelimiters)
aInput
- the input string to tokenize, can be null
;aDelimiters
- the delimiter characters to break the given input on,
cannot be null
.
null
if
the original input was null
.public static String unquote(String aInput)
aInput
- the input string to remove the quotes from, may be
null
.
null
if
the original input was null
.unquote(String, char)
public static String unquote(String aInput, char aQuoteChar)
aInput
- the input string to remove the quotes from, may be
null
;aQuoteChar
- the quote character to remove.
null
if
the original input was null
. If the given input
contained leading and/or trailing whitespace, it is removed from
the result.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |