|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.common.util.Str
public class Str
Operations on String
that are null
safe
Field Summary | |
---|---|
static String |
COMMA
|
static String |
CR
|
static String |
DOT
|
static char |
DOUBLE_QUOTE
|
static String |
EMPTY_STRING
|
static String |
FORWARD_SLASH
|
static String |
LF
|
static String |
SPACE
|
static String |
UTF8
|
Constructor Summary | |
---|---|
Str()
|
Method Summary | |
---|---|
static boolean |
contains(List<String> tokens,
String value,
boolean caseSensitive)
|
static boolean |
equals(String s1,
String s2,
boolean caseSensitive)
|
static String |
flatten(String s)
Replace carriage returns and linefeeds with a space |
static String |
flatten(String s,
String cr,
String lf)
Replace carriage returns with cr and linefeeds with lf . |
static byte[] |
getBytes(String s,
String encoding)
|
static String |
getPath(String s)
Convert dots to forward slashes and trim. |
static String |
getString(byte[] bytes,
String encoding)
|
static byte[] |
getUTF8Bytes(String s)
|
static String |
quote(String s)
Surround the string with double quotes. |
static String[] |
split(String s,
String separatorChars,
boolean trim)
Split the string into tokens using the indicated separator chars, optionally trimming the tokens. |
static String[] |
splitAndTrim(String s,
String separatorChars)
Split the string into tokens using the indicated separator, trimming as we go. |
static String[] |
splitAndTrimCSV(String csv)
Split comma separated values into tokens, trimming as we go. |
static String[] |
splitCSV(String csv,
boolean trim)
Split comma separated values into tokens, optionally trimming the tokens. |
static String |
toString(String[] tokens)
Combine tokens into a String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EMPTY_STRING
public static final String UTF8
public static final String COMMA
public static final String SPACE
public static final String CR
public static final String LF
public static final String DOT
public static final String FORWARD_SLASH
public static final char DOUBLE_QUOTE
Constructor Detail |
---|
public Str()
Method Detail |
---|
public static final String getString(byte[] bytes, String encoding)
public static final byte[] getUTF8Bytes(String s)
public static final byte[] getBytes(String s, String encoding)
public static final boolean contains(List<String> tokens, String value, boolean caseSensitive)
public static final boolean equals(String s1, String s2, boolean caseSensitive)
public static final String toString(String[] tokens)
tokens
into a String
public static final String getPath(String s)
public static final String quote(String s)
public static final String[] splitCSV(String csv, boolean trim)
public static final String[] splitAndTrimCSV(String csv)
public static final String[] splitAndTrim(String s, String separatorChars)
public static final String[] split(String s, String separatorChars, boolean trim)
public static final String flatten(String s)
public static final String flatten(String s, String cr, String lf)
cr
and linefeeds with lf
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |