public final class JRStringUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_NUMBER_OUTSIDE_BOUNDS |
protected static char[] |
HEX_DIGITS |
protected static String[] |
HUNDRED_DIGITS |
protected static String |
JAVA_IDENTIFIER_PREFIX |
protected static Pattern |
PATTERN_CSS_INVALID_CHARACTER |
protected static String[] |
TEN_DIGITS |
protected static String[] |
THOUSAND_DIGITS |
protected static String[] |
UNIT_DIGITS |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
cssClassReplacement(String text) |
static String |
encodeXmlAttribute(String text) |
static String |
encodeXmlAttribute(String text,
boolean exceptApos) |
static String |
escapeJavaScript(String input)
Escapes a text so that it can be used as a Java String literal.
|
static String |
escapeJavaStringLiteral(String text)
Escapes a text so that it can be used as a Java String literal.
|
static String |
escapeJSONString(String text)
Escapes a text to be used for a JSON string value.
|
static String |
escapeString4JavaScript(String input)
Escapes a Java String so that it can be used as a JavaScript String literal.
|
static String |
getCSSClass(String name) |
static String |
getJavaIdentifier(String name)
Takes a name and returns the same if it is a Java identifier;
else it substitutes the illegal characters so that it can be an identifier
|
static String |
getLetterNumeral(int number,
boolean isUpperCase) |
static String |
getRomanNumeral(int number,
boolean isUpperCase) |
static String |
getString(Object value) |
static List<Integer> |
getTabIndexes(String text) |
static String |
htmlEncode(String text) |
static String |
replaceCRwithLF(String text)
This method replaces all occurrences of the CR character with the LF character,
except when the CR is immediately followed by a LF (CRLF sequences), in which case the CR is removed.
|
static List<String> |
split(String[] srcArray,
String delimiterRegExp) |
static String |
xmlEncode(String text) |
static String |
xmlEncode(String text,
String invalidCharReplacement) |
protected static final String JAVA_IDENTIFIER_PREFIX
protected static final Pattern PATTERN_CSS_INVALID_CHARACTER
protected static final char[] HEX_DIGITS
public static final String EXCEPTION_MESSAGE_KEY_NUMBER_OUTSIDE_BOUNDS
protected static final String[] THOUSAND_DIGITS
protected static final String[] HUNDRED_DIGITS
protected static final String[] TEN_DIGITS
protected static final String[] UNIT_DIGITS
public static String replaceCRwithLF(String text)
public static String getJavaIdentifier(String name)
name - public static String escapeJavaStringLiteral(String text)
text - the textpublic static String escapeJavaScript(String input)
input - public static String escapeString4JavaScript(String input)
input - public static String escapeJSONString(String text)
text - the text to escape for JSONpublic static String getLetterNumeral(int number, boolean isUpperCase)
public static String getRomanNumeral(int number, boolean isUpperCase)
number - an integer value between 1 and 3999isUpperCase - specifies whether the result should be made of upper case charactersCopyright © 2019 TIBCO Software Inc.. All rights reserved.