code: static final int match(String text, int pos, int ch) {
          if (pos < 0 || pos >= text.length()) {
              return -1;
          }
          pos = skipBidiMarks(text, pos);
          if (PatternProps.isWhiteSpace(ch)) {
              // Advance over run of white space in input text
              // Must see at least one white space char in input
              int s = pos;
              pos = skipPatternWhiteSpace(text, pos);
              if (pos == s) {
                  return -1;
              }
              return pos;
          }
          if (pos >= text.length() || UTF16.charAt(text, pos) != ch) {
              return -1;
          }
          pos = skipBidiMarks(text, pos + UTF16.getCharCount(ch));
          return pos;
      }
docs: Matches a single character at text[pos] and return the index of the next character
  upon success. Return -1 on failure. If ch is a Pattern_White_Space then match a run of
  white space in text.