public class StringUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StringUtils.TraditionalBinaryPrefix
The traditional binary prefixes, kilo, mega, ..., exa,
which can be represented by a 64-bit integer.
|
Modifier and Type | Field and Description |
---|---|
static String[] |
EMPTY_STRING_ARRAY |
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
arrayToString(String[] strs)
Given an array of strings, return a comma-separated list of its elements.
|
static Collection<String> |
getStringCollection(String str)
Returns a collection of strings.
|
static String[] |
getStrings(String str)
Returns an arraylist of strings.
|
static Collection<String> |
getTrimmedStringCollection(String str)
Splits a comma separated value
String , trimming leading and trailing whitespace on each value. |
static String[] |
getTrimmedStrings(String str)
Splits a comma separated value
String , trimming leading and trailing whitespace on each value. |
static boolean |
isValidDNSSuffix(String suffix)
Check if the given DNS suffix is valid by checking that each label is at least 1 and at most 63 characters
in length.
|
static String |
stripLeadingDigits(String str)
Strip all leading digits from a string.
|
public static final String[] EMPTY_STRING_ARRAY
public static String stripLeadingDigits(String str)
str
- string to strippublic static boolean isValidDNSSuffix(String suffix) throws IllegalArgumentException
suffix
- the suffix to checkIllegalArgumentException
public static String[] getStrings(String str)
str
- the comma seperated string valuespublic static Collection<String> getStringCollection(String str)
str
- comma seperated string valuesArrayList
of string valuespublic static Collection<String> getTrimmedStringCollection(String str)
String
, trimming leading and trailing whitespace on each value.str
- a comma separated Collection
of String
valuespublic static String[] getTrimmedStrings(String str)
String
, trimming leading and trailing whitespace on each value.str
- a comma separated String
valuesCopyright © 2013-2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.