Class StringUtils


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

      Constructors 
      Modifier Constructor Description
      private StringUtils()
      Private constructor prevents object creation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean endsWithIgnoreCase​(java.lang.String base, java.lang.String end)
      Helper functions to query a strings end portion.
      static java.lang.String getLineSeparator()
      Queries the system properties for the line separator.
      static boolean startsWithIgnoreCase​(java.lang.String base, java.lang.String start)
      Helper functions to query a strings start portion.
      • Methods inherited from class java.lang.Object

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

      • StringUtils

        private StringUtils()
        Private constructor prevents object creation.
    • Method Detail

      • startsWithIgnoreCase

        public static boolean startsWithIgnoreCase​(java.lang.String base,
                                                   java.lang.String start)
        Helper functions to query a strings start portion. The comparison is case insensitive.
        Parameters:
        base - the base string.
        start - the starting text.
        Returns:
        true, if the string starts with the given starting text.
      • endsWithIgnoreCase

        public static boolean endsWithIgnoreCase​(java.lang.String base,
                                                 java.lang.String end)
        Helper functions to query a strings end portion. The comparison is case insensitive.
        Parameters:
        base - the base string.
        end - the ending text.
        Returns:
        true, if the string ends with the given ending text.
      • getLineSeparator

        public static java.lang.String getLineSeparator()
        Queries the system properties for the line separator. If access to the System properties is forbidden, the UNIX default is returned.
        Returns:
        the line separator.