public class StringUtils extends Object
Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_FILENAME_WHITESPACE_CHAR |
static String |
NEWLINE |
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
capitalize(String string) |
static String |
createFileName(String str)
replaces only white spaces from file name, uses the
DEFAULT_FILENAME_WHITESPACE_CHAR
|
static String |
createFileName(String str,
char whitespaceChar)
replaces only white spaces from file name
|
static String |
createFileName2(String str,
char replace)
replaces all non letter and non digit characters from file name
|
static Writer |
createSeparatedRow(Writer writer,
StringList values,
char separator,
char quote) |
static String |
createXmlName(String str) |
static String |
fixLineSeparator(String xml) |
static String |
getSubstringBeforeFirstWhitespace(String originalString)
Returns a
String that is positioned before the first whitespace in the specified text |
static boolean |
hasContent(String str) |
static boolean |
isNullOrEmpty(String str) |
static String |
join(String[] array,
String separator) |
static String[] |
merge(String[] incomingNames,
String string) |
static String |
normalizeSpace(String str) |
static int |
parseInt(String str,
int defaultValue) |
static String |
quote(String str) |
static StringList |
readSeparatedRow(String row,
char separator,
char quote) |
static String |
replace(String data,
String from,
String to) |
static String[] |
sortNames(String[] names) |
static List<String> |
splitLines(String string) |
static String |
stripStartAndEnd(String s,
String start,
String end) |
static String |
toHtml(String string) |
static String |
toHtml(String string,
int maxSize) |
static String[] |
toStringArray(Object[] selectedOptions) |
static List<String> |
toStringList(Object[] selectedOptions) |
static String |
unquote(String str) |
public static final String NEWLINE
public static final char DEFAULT_FILENAME_WHITESPACE_CHAR
public static boolean isNullOrEmpty(String str)
public static int parseInt(String str, int defaultValue)
public static boolean hasContent(String str)
public static Writer createSeparatedRow(Writer writer, StringList values, char separator, char quote) throws IOException
IOException
public static StringList readSeparatedRow(String row, char separator, char quote)
public static String createFileName(String str, char whitespaceChar)
public static String createFileName(String str)
public static String createFileName2(String str, char replace)
str
- replace
- public static String fixLineSeparator(String xml) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String getSubstringBeforeFirstWhitespace(String originalString)
String
that is positioned before the first whitespace in the specified textoriginalString
- the String
to be cutString
that contains all the symbols before the first whitespace in initial String
Copyright © 2019. All Rights Reserved.