public class StringUtility
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static char |
quote |
| Constructor and Description |
|---|
StringUtility() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
blankBetweenParenthesis(java.lang.String statement) |
static java.lang.String |
blankQuotes(java.lang.String strWithQuotes)
This method creates a copy of the string where the contents of quoted strings are replaced by
X's, so searches can be done while ignoring what's quoted.
|
static java.lang.String |
createCommaString(java.util.Collection<java.lang.String> items)
Returns elements of the list separated by commas.
|
static java.lang.String |
createCommaString(java.lang.String... items)
Returns elements of the list separated by commas.
|
static java.lang.String |
createCommaStringQuoted(java.util.List<java.lang.String> items)
Returns elements of the list contained by single quotes and separated by commas.
|
static java.lang.String |
createCommaStringQuoted(java.lang.String... items)
Returns elements of the array contained by single quotes and separated by commas.
|
static java.lang.String |
createListString(java.lang.String separator,
java.lang.String[] items)
Returns items as a string with the the given separator.
|
static java.lang.String |
delimit(java.util.List<java.lang.String> clauses,
java.lang.String delimiter)
Combine the elements of the array with the delimiter given.
|
static java.lang.String |
delimit(java.lang.String[] keys,
java.lang.String delimiter)
Combine the elements of the array with the delimiter given.
|
static boolean |
isAsciiEncoded(java.lang.String str)
Returns true if string can be ASCII encoded.
|
static boolean |
isEmpty(java.lang.String str)
Determine if the string has any characters.
|
static java.lang.String |
singleToDoubleQuotes(java.lang.String in)
Scan input string to see if it contains any single quotes,
and replace any single quote with two single quotes.
|
static boolean |
stringsEqual(java.lang.String str,
java.lang.String rts)
Compare two strings where one or both of the strings may be null.
|
static java.lang.String |
toUpperCase(java.lang.String str)
Uppercases a string if it is not null.
|
public static final char quote
public static java.lang.String createCommaString(java.util.Collection<java.lang.String> items)
items - public static java.lang.String createListString(java.lang.String separator,
java.lang.String[] items)
public static java.lang.String createCommaString(java.lang.String... items)
items - public static boolean isEmpty(java.lang.String str)
str - The String to checkpublic static java.lang.String blankQuotes(java.lang.String strWithQuotes)
strWithQuotes - public static boolean stringsEqual(java.lang.String str,
java.lang.String rts)
str - rts - public static java.lang.String createCommaStringQuoted(java.lang.String... items)
items - public static java.lang.String createCommaStringQuoted(java.util.List<java.lang.String> items)
items - public static boolean isAsciiEncoded(java.lang.String str)
string - public static java.lang.String toUpperCase(java.lang.String str)
public static java.lang.String delimit(java.lang.String[] keys,
java.lang.String delimiter)
keys - delimiter - put between the keys.public static java.lang.String delimit(java.util.List<java.lang.String> clauses,
java.lang.String delimiter)
keys - delimiter - put between the keys.public static java.lang.String singleToDoubleQuotes(java.lang.String in)
in - The value to be analyzed.public static java.lang.String blankBetweenParenthesis(java.lang.String statement)