@InterfaceAudience.Private public final class StringHelper extends Object
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Joiner |
_JOINER |
static com.google.common.base.Splitter |
_SPLITTER |
static com.google.common.base.Joiner |
CSV_JOINER |
static com.google.common.base.Joiner |
DOT_JOINER |
static com.google.common.base.Joiner |
JOINER |
static com.google.common.base.Joiner |
PATH_ARG_JOINER |
static com.google.common.base.Joiner |
PATH_JOINER |
static com.google.common.base.Joiner |
SSV_JOINER |
static com.google.common.base.Splitter |
SSV_SPLITTER |
Constructor and Description |
---|
StringHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
_join(Object... args)
Join on underscore
|
static Iterable<String> |
_split(CharSequence s)
Split on _ and trim results
|
static String |
cjoin(Object... args)
Join on comma.
|
static String |
djoin(Object... args)
Join on dot
|
static String |
getResourceSecondsString(Map<String,Long> targetMap) |
static boolean |
isAbsUrl(CharSequence url)
Check whether a url is absolute or note
|
static String |
join(Object... args)
Join without separator
|
static String |
joins(String sep,
Object... args)
Join with a separator
|
static String |
pajoin(Object... args)
Join on slash and colon (e.g., path args in routing spec)
|
static String |
pjoin(Object... args)
Join on slash
|
static String |
sjoin(Object... args)
Join on space.
|
static Iterable<String> |
split(CharSequence s)
Split on space and trim results.
|
static String |
ujoin(String pathPrefix,
String... args)
Join url components
|
public static final com.google.common.base.Joiner SSV_JOINER
public static final com.google.common.base.Joiner CSV_JOINER
public static final com.google.common.base.Joiner JOINER
public static final com.google.common.base.Joiner _JOINER
public static final com.google.common.base.Joiner PATH_JOINER
public static final com.google.common.base.Joiner PATH_ARG_JOINER
public static final com.google.common.base.Joiner DOT_JOINER
public static final com.google.common.base.Splitter SSV_SPLITTER
public static final com.google.common.base.Splitter _SPLITTER
public static String sjoin(Object... args)
args
- to joinpublic static String cjoin(Object... args)
args
- to joinpublic static String djoin(Object... args)
args
- to joinpublic static String _join(Object... args)
args
- to joinpublic static String pjoin(Object... args)
args
- to joinpublic static String pajoin(Object... args)
args
- to joinpublic static String join(Object... args)
args
- public static String joins(String sep, Object... args)
sep
- the separatorargs
- to joinpublic static Iterable<String> split(CharSequence s)
s
- the string to splitpublic static Iterable<String> _split(CharSequence s)
s
- the string to splitpublic static boolean isAbsUrl(CharSequence url)
url
- to checkpublic static String ujoin(String pathPrefix, String... args)
pathPrefix
- for relative urlsargs
- url components to joinCopyright © 2008–2019 Apache Software Foundation. All rights reserved.