public CharBuffer expect(final char expectedChar) throws StringTagParseException {
    this.skipWhitespace();
    if (!this.hasMore()) {
      throw this.makeError("Expected character '" + expectedChar + "' but got EOF");
    }
    if (this.peek() != expectedChar) {
      throw this.makeError("Expected character '" + expectedChar + "' but got '" + this.peek() + "'");
    }
    this.take();
    return this;
  }
Assert that the next non-whitespace character is the provided parameter.

<p>If the assertion is successful, the token will be consumed.</p>

@param expectedChar expected character
@return this
@throws StringTagParseException if EOF or non-matching value is found
nbt/src/main/java/net/kyori/adventure/nbt/CharBuffer.java