code: public boolean regionMatches(int thisStart, CharSequence string, int start, int length) {
          if (string == null) {
              throw new NullPointerException("string");
          }
  
          if (start < 0 || string.length() - start < length) {
              return false;
          }
  
          final int thisLen = length();
          if (thisStart < 0 || thisLen - thisStart < length) {
              return false;
          }
  
          if (length <= 0) {
              return true;
          }
  
          final int thatEnd = start + length;
          for (int i = start, j = thisStart + arrayOffset(); i < thatEnd; i++, j++) {
              if (b2c(value[j]) != string.charAt(i)) {
                  return false;
              }
          }
          return true;
      }
docs: Compares the specified string to this string and compares the specified range of characters to determine if they
  are the same.
  
  @param thisStart the starting offset in this string.
  @param string the string to compare.
  @param start the starting offset in the specified string.
  @param length the number of characters to compare.
  @return {@code true} if the ranges of characters are equal, {@code false} otherwise
  @throws NullPointerException if {@code string} is {@code null}.