Package org.jboss.netty.util.internal
Class StringUtil
- java.lang.Object
-
- org.jboss.netty.util.internal.StringUtil
-
public final class StringUtil extends Object
String utility class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]split(String value, char delim)Splits the specifiedStringwith the specified delimiter.static String[]split(String value, char delim, int maxParts)Splits the specifiedStringwith the specified delimiter in maxParts maximum parts.static StringstripControlCharacters(Object value)Strip an Object of it's ISO control characters.static StringstripControlCharacters(String value)Strip a String of it's ISO control characters.static StringsubstringAfter(String value, char delim)Get the item after one char delim if the delim is found (else null).
-
-
-
Field Detail
-
NEWLINE
public static final String NEWLINE
-
-
Method Detail
-
stripControlCharacters
public static String stripControlCharacters(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:
StringA 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 String stripControlCharacters(String value)
Strip a String of it's ISO control characters.- Parameters:
value- The String that should be stripped.- Returns:
StringA 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 String[] split(String value, char delim)
Splits the specifiedStringwith the specified delimiter. This operation is a simplified and optimized version ofString.split(String).
-
split
public static String[] split(String value, char delim, int maxParts)
Splits the specifiedStringwith the specified delimiter in maxParts maximum parts. This operation is a simplified and optimized version ofString.split(String, int).
-
substringAfter
public static String substringAfter(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).
-
-