|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.common.util.StrUtils
public class StrUtils
Field Summary | |
---|---|
static char[] |
HEX_DIGITS
|
Constructor Summary | |
---|---|
StrUtils()
|
Method Summary | |
---|---|
static String |
join(List<?> items,
char separator)
Creates a backslash escaped string, joining all the items. |
static boolean |
parseBool(String s)
how to transform a String into a boolean... |
static boolean |
parseBool(String s,
boolean def)
NullPointerException and SolrException free version of parseBool(String) |
static boolean |
parseBoolean(String s)
Return if a string starts with '1', 't', or 'T' and return false otherwise. |
static void |
partialURLEncodeVal(Appendable dest,
String val)
URLEncodes a value, replacing only enough chars so that the URL may be unambiguously pasted back into a browser. |
static List<String> |
splitFileNames(String fileNames)
Splits file names separated by comma character. |
static List<String> |
splitSmart(String s,
char separator)
Split a string based on a separator, but don't split if it's inside a string. |
static List<String> |
splitSmart(String s,
String separator,
boolean decode)
Splits a backslash escaped string on the separator. |
static List<String> |
splitWS(String s,
boolean decode)
|
static List<String> |
toLower(List<String> strings)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char[] HEX_DIGITS
Constructor Detail |
---|
public StrUtils()
Method Detail |
---|
public static List<String> splitSmart(String s, char separator)
public static List<String> splitSmart(String s, String separator, boolean decode)
Current backslash escaping supported:
\n \t \r \b \f are escaped the same as a Java String
Other characters following a backslash are produced verbatim (\c => c)
s
- the string to splitseparator
- the separator to split ondecode
- decode backslash escapingpublic static List<String> splitFileNames(String fileNames)
fileNames
- the string containing file names
public static String join(List<?> items, char separator)
public static List<String> splitWS(String s, boolean decode)
public static List<String> toLower(List<String> strings)
public static boolean parseBoolean(String s)
public static boolean parseBool(String s)
public static boolean parseBool(String s, boolean def)
NullPointerException
and SolrException
free version of parseBool(String)
s
- def
-
public static void partialURLEncodeVal(Appendable dest, String val) throws IOException
Characters with a numeric value less than 32 are encoded. &,=,%,+,space are encoded.
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |