Package antlr

Class StringUtils


  • public class StringUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      StringUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String stripBack​(java.lang.String s, char c)
      General-purpose utility function for removing characters from back of string
      static java.lang.String stripBack​(java.lang.String s, java.lang.String remove)
      General-purpose utility function for removing characters from back of string
      static java.lang.String stripFront​(java.lang.String s, char c)
      General-purpose utility function for removing characters from front of string
      static java.lang.String stripFront​(java.lang.String s, java.lang.String remove)
      General-purpose utility function for removing characters from front of string
      static java.lang.String stripFrontBack​(java.lang.String src, java.lang.String head, java.lang.String tail)
      General-purpose utility function for removing characters from the front and back of string
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringUtils

        public StringUtils()
    • Method Detail

      • stripBack

        public static java.lang.String stripBack​(java.lang.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 java.lang.String stripBack​(java.lang.String s,
                                                 java.lang.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 java.lang.String stripFront​(java.lang.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 java.lang.String stripFront​(java.lang.String s,
                                                  java.lang.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 java.lang.String stripFrontBack​(java.lang.String src,
                                                      java.lang.String head,
                                                      java.lang.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