| Constructor and Description |
|---|
ModelStringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
escape(StringBuilder buffer,
String value)
Write
value to buffer, escaping double quote and backslash with a backslash. |
static void |
escape(StringBuilder buffer,
String value,
char quoteChar)
Write
value to buffer, escaping double quote and backslash with a backslash. |
static long |
getMemoryUsage(String value)
Get the estimated memory usage for
value. |
static boolean |
isBlank(String s) |
static boolean |
isEmpty(String s) |
static String |
join(int[] ints,
char sep,
int count)
Joins an array of ints into a string with a given separator.
|
static String |
join(int[] ints,
char sep,
int start,
int count)
Joins an array of ints into a string with a given separator.
|
static String |
join(int[] ints,
String sep)
Joins an array of ints into a string with a given separator.
|
static String |
join(int[] ints,
String sep,
int count)
Joins an array of ints into a string with a given separator.
|
static String |
join(int[] ints,
String sep,
int start,
int count)
Joins an array of ints into a string with a given separator.
|
static String |
join(Iterator<? extends Object> iterator,
String separator) |
static String |
join(List<String> strList,
String separator)
Joins input string list with separator
|
static String |
join(long[] longs,
String sep)
Joins an array of longs into a string with a given separator.
|
static String |
join(long[] longs,
String sep,
int start,
int count)
Joins an array of longs into a string with a given separator.
|
static String |
join(Object[] params,
String separator) |
static String |
join(String[] array,
char sep,
int startIndex,
int endIndex)
Join slice of
array identified by startIndex and endIndex on sep. |
static String |
join(String a,
String b,
char sep)
Join 2 strings on a separator character.
|
static Map<String,String[]> |
parseQueryString(String qs,
String encoding)
Parses a standard uri query string.
|
static String |
quote(String value)
Wrap
value in double quotes. |
static void |
quote(StringBuilder buffer,
String value)
Write the quoted string form of
value to buffer. |
static void |
quote(StringBuilder buffer,
String value,
char quoteChar)
Write the quoted string form of
value to buffer. |
static void |
quoteFieldName(StringBuilder buffer,
CharSequence text) |
static void |
quoteFieldName(StringBuilder buffer,
CharSequence text,
char quoteChar)
Conditionally wrap
text in double quotes if it contains special characters not allowed in a field name. |
static void |
quoteQueryTerm(StringBuilder buffer,
CharSequence text)
Conditionally wrap
text in double quotes if it contains special characters not allowed in a field name. |
static StringBuilder |
repeat(StringBuilder buffer,
String value,
int count)
Append
value to buffer count times. |
static String[] |
split(String s,
char c) |
static String[] |
split(String s,
char c,
int max) |
public static long getMemoryUsage(String value)
value.public static StringBuilder repeat(StringBuilder buffer, String value, int count)
value to buffer count times. A negative value of count
is silently treated as zero.public static boolean isEmpty(String s)
public static boolean isBlank(String s)
public static String join(int[] ints, char sep, int count)
ints - the integerssep - the separatorcount - only join this many intspublic static String join(long[] longs, String sep)
longs - the longssep - the separatorpublic static String join(int[] ints, char sep, int start, int count)
ints - the integerssep - the separatorcount - only join this many intspublic static String join(long[] longs, String sep, int start, int count)
longs - the longssep - the separatorcount - only join this many intspublic static String join(List<String> strList, String separator)
strList - string list to joinseparator - to use in between valuespublic static String join(int[] ints, String sep)
ints - the integerssep - the separatorpublic static String join(int[] ints, String sep, int count)
ints - the integerssep - the separatorpublic static String join(int[] ints, String sep, int start, int count)
ints - the integerssep - the separatorcount - only join this many intspublic static String join(String a, String b, char sep)
public static String join(String[] array, char sep, int startIndex, int endIndex)
array identified by startIndex and endIndex on sep.
Throws NegativeArraySizeException if startIndex is less than or equal to endIndex.public static String quote(String value)
value in double quotes.
Any double quotes in value will be escaped by a backslash. Any backslashes in value will be escaped as double backslashes.
No other escaping is done; for example a tab character is returned as simply a tab character, not backslash-t.
public static void quoteFieldName(StringBuilder buffer, CharSequence text)
public static void quoteFieldName(StringBuilder buffer, CharSequence text, char quoteChar)
text in double quotes if it contains special characters not allowed in a field name.public static void quoteQueryTerm(StringBuilder buffer, CharSequence text)
text in double quotes if it contains special characters not allowed in a field name.public static void quote(StringBuilder buffer, String value)
value to buffer.
Any double quotes and backslashes in value will be escaped by a backslash. No other escaping is done; for
example a tab character is returned as simply a tab character, not backslash-t.
public static void quote(StringBuilder buffer, String value, char quoteChar)
value to buffer.
Any double quotes and backslashes in value will be escaped by a backslash. No other escaping is done; for
example a tab character is returned as simply a tab character, not backslash-t.
public static void escape(StringBuilder buffer, String value)
value to buffer, escaping double quote and backslash with a backslash.public static void escape(StringBuilder buffer, String value, char quoteChar)
value to buffer, escaping double quote and backslash with a backslash.public static Map<String,String[]> parseQueryString(String qs, String encoding) throws UnsupportedEncodingException
qs - encoding - UnsupportedEncodingExceptionCopyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.