Package antlr
Class StringUtils
- java.lang.Object
-
- antlr.StringUtils
-
public class StringUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description StringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
stripBack(String s, char c)
General-purpose utility function for removing characters from back of stringstatic String
stripBack(String s, String remove)
General-purpose utility function for removing characters from back of stringstatic String
stripFront(String s, char c)
General-purpose utility function for removing characters from front of stringstatic String
stripFront(String s, String remove)
General-purpose utility function for removing characters from front of stringstatic String
stripFrontBack(String src, String head, String tail)
General-purpose utility function for removing characters from the front and back of string
-
-
-
Method Detail
-
stripBack
public static String stripBack(String s, char c)
General-purpose utility function for removing characters from back of string- Parameters:
s
- The string to processc
- The character to remove- Returns:
- The resulting string
-
stripBack
public static String stripBack(String s, String remove)
General-purpose utility function for removing characters from back of string- Parameters:
s
- The string to processremove
- A string containing the set of characters to remove- Returns:
- The resulting string
-
stripFront
public static String stripFront(String s, char c)
General-purpose utility function for removing characters from front of string- Parameters:
s
- The string to processc
- The character to remove- Returns:
- The resulting string
-
stripFront
public static String stripFront(String s, String remove)
General-purpose utility function for removing characters from front of string- Parameters:
s
- The string to processremove
- A string containing the set of characters to remove- Returns:
- The resulting string
-
stripFrontBack
public static String stripFrontBack(String src, String head, String tail)
General-purpose utility function for removing characters from the front and back of string- Parameters:
s
- The string to processhead
- exact string to strip from headtail
- exact string to strip from tail- Returns:
- The resulting string
-
-