Package org.jboss.netty.util.internal
Class StringUtil
java.lang.Object
org.jboss.netty.util.internal.StringUtil
String utility class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
Splits the specifiedString
with the specified delimiter.static String[]
Splits the specifiedString
with the specified delimiter in maxParts maximum parts.static String
stripControlCharacters
(Object value) Strip an Object of it's ISO control characters.static String
stripControlCharacters
(String value) Strip a String of it's ISO control characters.static String
substringAfter
(String value, char delim) Get the item after one char delim if the delim is found (else null).
-
Field Details
-
NEWLINE
-
EMPTY_STRING
- See Also:
-
-
Constructor Details
-
StringUtil
private StringUtil()
-
-
Method Details
-
stripControlCharacters
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
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
Splits the specifiedString
with the specified delimiter. This operation is a simplified and optimized version ofString.split(String)
. -
split
Splits the specifiedString
with the specified delimiter in maxParts maximum parts. This operation is a simplified and optimized version ofString.split(String, int)
. -
substringAfter
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)
.
-