public static boolean regionMatches(@NotNull CharSequence buffer, int start, int end, @NotNull CharSequence s) {
    int len = s.length();
    if (start + len > end) return false;
    if (start < 0) return false;

    for (int i = 0; i < len; i++) {
      if (buffer.charAt(start + i) != s.charAt(i)) return false;
    }
    return true;
  }
public static boolean regionMatches(@NotNull CharSequence buffer, int start, int end, @NotNull CharSequence s)