Class CharSequenceUtils


  • public class CharSequenceUtils
    extends java.lang.Object

    Operations on CharSequence that are null safe.

    Copied from Apache Commons Lang r1586295 on April 10, 2014 (day of 3.3.2 release).

    Since:
    1.10
    See Also:
    CharSequence
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static boolean regionMatches​(java.lang.CharSequence cs, boolean ignoreCase, int thisStart, java.lang.CharSequence substring, int start, int length)
      Green implementation of regionMatches.
      • Methods inherited from class java.lang.Object

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

      • CharSequenceUtils

        public CharSequenceUtils()
    • Method Detail

      • regionMatches

        static boolean regionMatches​(java.lang.CharSequence cs,
                                     boolean ignoreCase,
                                     int thisStart,
                                     java.lang.CharSequence substring,
                                     int start,
                                     int length)
        Green implementation of regionMatches.

        Note: This function differs from the current implementation in Apache Commons Lang where the input indices are not valid. It is only used within this package.

        Parameters:
        cs - the CharSequence to be processed
        ignoreCase - whether or not to be case insensitive
        thisStart - the index to start on the cs CharSequence
        substring - the CharSequence to be looked for
        start - the index to start on the substring CharSequence
        length - character length of the region
        Returns:
        whether the region matched