public class StringUtils extends Object
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
escapeHtml(String str)
Escape the string to make it safe for use within an HTML document.
|
static boolean |
isZipOrJarFile(String str)
Check whether the argument has a .zip or .jar file extension
|
static String |
join(String[] strings,
String separator) |
static int |
searchNewline(CharBuffer buffer,
int from)
Scan for a newline sequence in the given CharBuffer, starting at
position from until buffer.position().
|
static String[] |
split(String str)
Split a string into an array of strings.
|
static String[] |
split(String str,
String delim)
Split a string into an array of strings.
|
static String[] |
splitLines(String str)
Break a string into a string array, using line breaks as delimiters.
|
static Class[] |
toClassArray(String str,
String delim)
Split a string and try to convert to an array of classes.
|
public static String[] split(String str)
str - the string to splitpublic static String[] split(String str, String delim)
str - the string to splitdelim - the delimiter to split the string atpublic static String[] splitLines(String str)
str - the string to splitpublic static String escapeHtml(String str)
str - the string to escapepublic static Class[] toClassArray(String str, String delim) throws ClassNotFoundException
str - a string containint class namesdelim - the delimiterClassNotFoundException - if any class name contained in the string
couldn't be resolvedpublic static boolean isZipOrJarFile(String str)
str - a file namepublic static int searchNewline(CharBuffer buffer, int from)
buffer - the character bufferfrom - the position to start searchingCopyright © 2016. All rights reserved.