public final class StringUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
STRING_OVERFLOW_CONTINUATION
Overflow continuation.
|
static int |
STRING_OVERFLOW_CONTINUATION_LENGTH
Overflow continuation length.
|
Modifier and Type | Method and Description |
---|---|
static String |
abbreviate(String s,
int maxLength) |
static String |
chomp(String s) |
static String |
chop(String s) |
static String |
flatten(String s)
Flatten multiple lines into one line.
|
static String |
getEscapedKey(String key,
boolean unicodeSupport) |
static <T> String |
join(Collection<T> objects) |
static <T> String |
join(Collection<T> objects,
String separator) |
static String |
join(String[] strings) |
static String |
join(String[] strings,
String separator)
Join implementation for when we don't want external dependencies.
|
static String |
overlay(String s,
String overlay)
Overlay the given string with the provided string, e.g.
|
static String |
removeQuotes(String s) |
static String |
repeat(String s,
int count)
Included for stand alone usage of jar without StringUtils.
|
static List<String> |
split(String s)
Split on spaces, except where space exists within quotes.
|
static String[] |
splitToArray(String s) |
static String |
withDefault(String s) |
static String |
withDefault(String s,
String defaultValue) |
public static final String STRING_OVERFLOW_CONTINUATION
public static final int STRING_OVERFLOW_CONTINUATION_LENGTH
public static String join(String[] strings, String separator)
public static <T> String join(Collection<T> objects)
public static <T> String join(Collection<T> objects, String separator)
public static String repeat(String s, int count)
public static List<String> split(String s)
s
- string to splitpublic static String overlay(String s, String overlay)
s
- string to be overlaidoverlay
- string to overlay over the first stringpublic static String flatten(String s)
Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries