Consume the next character, skipping whitespace, and check that it matches a
specified character.
@param c The character to match.
@return The character.
170319
public char nextClean(char c) {
        char n = nextClean();
        if (n != c) {
            throw syntaxError("Expected '" + c + "' and instead saw '" + n + "'");
        }
        return n;
    }
454652
private static boolean isValidChar(char c) {
        if ( c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' ) {
            return true;
        }
        return c != ' ' && c != '\u00A0' && !Character.isWhitespace(c) && !Character.isWhitespace(c);
    }
1070645
private final int getWsOrChar(int ok)
        throws IOException, WstxException
    {
        int c = getNext();
        if (c == ok) {
            return c;
        }
        if (c > CHAR_SPACE) {
            reportUnexpectedChar(c, "; expected either '"+((char) ok)+"' or white space");
        }
        if (c == CHAR_LF || c == CHAR_CR) {
            // Need to push it back to be processed properly
            pushback();
        }
        return getNextAfterWs(false);
    }
923843
public static boolean isSpaceChar(char c) {
		if (c == 0x20) return true;
		if (c > 0xD) return false;
		if (c < 0x9) return false;
		return isSpace[c - 9];
	}
655747
public int skipWhitespace() {
        for (int i = index; i < originalInput.length(); i++) {
            char ch = originalInput.charAt(i);
            if (Character.isSpaceChar(ch) ) {
                index++;
            } else {
                break;
            }
        }
        return index;
    }
699967
public String form( char c ) {
        if (fmt != 'c') {
            throw new java.lang.IllegalArgumentException();
        }

        String r = "" + c;

        return pad(r);
    }
177156
private static int decodeHex(final char c) {
    if (c < '0') {
      return INVALID;
    }
    if (c <= '9') {
      return c - '0';
    }
    if (c < 'A') {
      return INVALID;
    }
    if (c <= 'F') {
      return c - 'A' + 10;
    }
    if (c < 'a') {
      return INVALID;
    }
    if (c <= 'f') {
      return c - 'a' + 10;
    }
    return INVALID;
  }
518053
public static DecomposableMatchBuilder1<Character, Character> caseChar(MatchesAny c) {
    List<Matcher<Object>> matchers = new ArrayList<>();
    matchers.add(any());

    return new DecomposableMatchBuilder1<>(
        matchers, 0, new PrimitiveFieldExtractor<>(Character.class));
  }
1120538
@Override
  public AbstractParserState consume(final char ch) {
    if (ch == this.thisLetter) {
      return this.nextState;
    }
    if (ch == '\n') {
      getParser().getNewLineState();
    }
    return this.noMatchState;
  }
1274932
public static String removeStartingChars(String s, char c) {
        int lastToRemove = -1;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == c) {
                lastToRemove = i;
                continue;
            }

            if (s.charAt(i) != c) {
                break;
            }
        }

        if (lastToRemove < 0) return s;
        return s.substring(lastToRemove + 1);
    }
628058
public String[] getPinyinFromChar(char c) {
        String s = Integer.toHexString(c).toUpperCase();
        return tables.get(s);
    }
234929
public static Iterator<Character> notExistChars(String s) {
    return new Iterator<Character>() {
      IntList collect = IntList.create(s.chars().distinct().sorted().toArray());
      int current = 128;
      Character next = null;

      @Override
      public Character next() {
        if (calcNext()) {
          Character c = next;
          next = null;
          return c;
        } else {
          throw new NoSuchElementException("No next non-exist character.");
        }
      }

      @Override
      public boolean hasNext() {
        return calcNext();
      }

      private boolean calcNext() {
        if (next == null) {
          while (++current < Integer.MAX_VALUE) {
            if (collect.remove(current) == false) {
              next = (char) current;
              return true;
            }
          }
          return false;
        }
        return true;
      }
    };
  }
278226
private int skipForward(char[] chars, int start, int length) {
    if (tc.isEntryEnabled())
      tc.entry(this,cclass, "skipForward", new Object[]{chars,new Integer(start),
        new Integer(length)});
    int ans = length;
    for (int i = 0; i < length; i++)
      if (chars[start+i] == MatchSpace.SUBTOPIC_SEPARATOR_CHAR) {
        ans = i;
        break;
      }
    if (tc.isEntryEnabled())
      tc.exit(this,cclass, "skipForward", new Integer(ans));
    return ans;
  }
1036476
def expect(self, c):
        
        if self.peek() != c:
            self.error('Expected "%c"' % (c,))
        self.skip_char()
283017
public static boolean isBlankChar(int c) {
		return Character.isWhitespace(c) || Character.isSpaceChar(c) || c == '\ufeff' || c == '\u202a';
	}
63877
@Override
  public AbstractParserState consume(final char ch) {
    if (ch == this.lowerLetter || ch == this.upperLetter) {
      return this.nextState;
    }
    if (ch == '\n') {
      getParser().getNewLineState();
    }
    return this.noMatchState;
  }
382395
final protected void putChar(char c) {
        final int clen = _internalBuffer.length;
        if (clen == _bufferPosition) {
            final char[] next = new char[2 * clen + 1];

            System.arraycopy(_internalBuffer, 0, next, 0, _bufferPosition);
            _internalBuffer = next;
        }

        _internalBuffer[_bufferPosition++] = c;
    }