|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aksw.commons.util.strings.StringUtils
public class StringUtils
| Constructor Summary | |
|---|---|
StringUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
coalesce(T... args)
Returns first non-null argument |
|
static String |
commonPrefix(String sa,
String sb)
Returns the common prefix of the given strings |
|
static String |
cropString(String str,
int nMax,
int nTolerance)
Cuts a string after nMax bytes - unless the remaining bytes are less than tolerance. |
|
static
|
getMatchBySuffix(String str,
Map<String,T> map)
|
|
static String |
lcFirst(String str)
|
|
static
|
longestPrefixLookup(String lookup,
NavigableMap<String,T> prefixMap)
Looks up an element in the given map that is the longest prefix of the given lookup key. |
|
static String |
md5Hash(byte[] bytes)
|
|
static String |
md5Hash(String string)
|
|
static String |
strip(String str,
String... chars)
Removes prefixes that are also suffixes from a given string e.g. |
|
static String |
toCamelCase(String s,
boolean upper)
|
|
static String |
toLowerCamelCase(String s)
|
|
static String |
toUpperCamelCase(String s)
|
|
static String |
ucFirst(String str)
|
|
static String |
urlDecode(String str)
|
|
static String |
urlEncode(String str)
Helper functions to get rid of that exception. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringUtils()
| Method Detail |
|---|
public static String strip(String str,
String... chars)
str - chars -
public static <T> T coalesce(T... args)
T - args -
public static String ucFirst(String str)
public static String lcFirst(String str)
public static String toLowerCamelCase(String s)
public static String toUpperCamelCase(String s)
public static String toCamelCase(String s,
boolean upper)
public static String cropString(String str,
int nMax,
int nTolerance)
str - nMax - nTolerance -
public static String commonPrefix(String sa,
String sb)
public static <T> Map.Entry<String,T> longestPrefixLookup(String lookup,
NavigableMap<String,T> prefixMap)
lookup - prefixMap -
public static <T> Map.Entry<String,T> getMatchBySuffix(String str,
Map<String,T> map)
public static String urlEncode(String str)
str -
public static String urlDecode(String str)
public static String md5Hash(byte[] bytes)
public static String md5Hash(String string)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||