peek

open fun peek(): Int

Try to read the next character without increasing the position


open fun peek(expected: Char): Boolean

Determine whether the next character is the expected character, but do not consume it.


abstract fun peek(offset: Int): Int

Try to read the next character starting at the given offset.

Parameters

offset

The offset to use. Note that large offset may break due to missing checks


open fun peek(offset: Int, expected: CharSequence): Boolean

Determine whether the following characters match the expected character sequence starting at the given offset.

Parameters

expected

The expected character sequence. Note that this may not contain '\r' characters as the implementation does not normalize end-of-line.


open fun peek(offset: Int, expected: Char): Boolean

Determine whether the following characters match the expected character sequence starting at the given offset.

Parameters

expected

The expected character. Note that this may not be '\r' characters as the implementation does not normalize end-of-line.


open fun peek(expected: CharSequence): Boolean

Determine whether the following characters match the expected character sequence)

Parameters

expected

The expected character sequence. Note that this may not contain '\r' characters as the implementation does not normalize end-of-line.