Package org.jboss.netty.util.internal
Class StringUtil
- java.lang.Object
-
- org.jboss.netty.util.internal.StringUtil
-
public final class StringUtil extends java.lang.Object
String utility class.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
EMPTY_STRING
static java.lang.String
NEWLINE
-
Constructor Summary
Constructors Modifier Constructor Description private
StringUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String[]
split(java.lang.String value, char delim)
Splits the specifiedString
with the specified delimiter.static java.lang.String[]
split(java.lang.String value, char delim, int maxParts)
Splits the specifiedString
with the specified delimiter in maxParts maximum parts.static java.lang.String
stripControlCharacters(java.lang.Object value)
Strip an Object of it's ISO control characters.static java.lang.String
stripControlCharacters(java.lang.String value)
Strip a String of it's ISO control characters.static java.lang.String
substringAfter(java.lang.String value, char delim)
Get the item after one char delim if the delim is found (else null).
-
-
-
Field Detail
-
NEWLINE
public static final java.lang.String NEWLINE
-
EMPTY_STRING
private static final java.lang.String EMPTY_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
stripControlCharacters
public static java.lang.String stripControlCharacters(java.lang.Object value)
Strip an Object of it's ISO control characters.- Parameters:
value
- The Object that should be stripped. This objects toString method will called and the result passed tostripControlCharacters(String)
.- Returns:
String
A new String instance with its hexadecimal control characters replaced by a space. Or the unmodified String if it does not contain any ISO control characters.
-
stripControlCharacters
public static java.lang.String stripControlCharacters(java.lang.String value)
Strip a String of it's ISO control characters.- Parameters:
value
- The String that should be stripped.- Returns:
String
A new String instance with its hexadecimal control characters replaced by a space. Or the unmodified String if it does not contain any ISO control characters.
-
split
public static java.lang.String[] split(java.lang.String value, char delim)
Splits the specifiedString
with the specified delimiter. This operation is a simplified and optimized version ofString.split(String)
.
-
split
public static java.lang.String[] split(java.lang.String value, char delim, int maxParts)
Splits the specifiedString
with the specified delimiter in maxParts maximum parts. This operation is a simplified and optimized version ofString.split(String, int)
.
-
substringAfter
public static java.lang.String substringAfter(java.lang.String value, char delim)
Get the item after one char delim if the delim is found (else null). This operation is a simplified and optimized version ofString.split(String, int)
.
-
-