public final class StringUtil
extends java.lang.Object
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
escapeQuotes(java.lang.String str)
Escape any single or double quotes within a string (usefull for strings
that will be placed inside HTML inputs)
|
static java.lang.String |
escapeQuotesSQL(java.lang.String str)
SQL strings use ' as delimeter, so inner quotes must be converted to ''
|
static java.lang.String |
replace(java.lang.String in,
java.lang.String find,
java.lang.String replace,
boolean caseInsensitive)
Given an input string, replace all occurences of a string sequence with a
given replacement string.
|
public static java.lang.String escapeQuotes(java.lang.String str)
str - public static java.lang.String escapeQuotesSQL(java.lang.String str)
str - public static java.lang.String replace(java.lang.String in,
java.lang.String find,
java.lang.String replace,
boolean caseInsensitive)
in - input stringfind - string sequence match againstreplace - string to replace matches withcaseInsensitive - should matching be case insensitive?