Package antlr

Class StringUtils

java.lang.Object
antlr.StringUtils

public class StringUtils extends Object
  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • 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 process
      c - 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 process
      remove - 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 process
      c - 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 process
      remove - 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 process
      head - exact string to strip from head
      tail - exact string to strip from tail
      Returns:
      The resulting string