Class StringUtils


  • public final class StringUtils
    extends java.lang.Object
    Utility class containing string handling methods
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getClassName​(java.lang.Object object)
      Returns object class name
      static java.lang.String stripEnd​(java.lang.String str, java.lang.String stripChars)
      Strips any of a set of characters from the end of a string.
      static java.lang.String stripStart​(java.lang.String str, java.lang.String stripChars)
      Strips any of a set of characters from the start of a string.
      • Methods inherited from class java.lang.Object

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

      • getClassName

        public static java.lang.String getClassName​(java.lang.Object object)
        Returns object class name
        Parameters:
        object - Object to evaluate
        Returns:
        Object class name or "null"
      • stripStart

        public static java.lang.String stripStart​(java.lang.String str,
                                                  java.lang.String stripChars)
        Strips any of a set of characters from the start of a string.
        Parameters:
        str - String to remove characters from, may be null
        stripChars - Characters to remove, null treated as whitespace
        Returns:
        Stripped String
      • stripEnd

        public static java.lang.String stripEnd​(java.lang.String str,
                                                java.lang.String stripChars)
        Strips any of a set of characters from the end of a string.
        Parameters:
        str - String to remove characters from, may be null
        stripChars - The set of characters to remove, null treated as whitespace
        Returns:
        Stripped String