Tinderbox v9 Icon

Skip operators

The skip operators advance the current position of the stream.

Stream.skip(N)

Skips the stream forward exactly n characters. A failure occurs if N reaches past the end of the stream.

Stream.skipTo("match string")

Advances the stream to the first occurrence of the target match string (which is not a regular expression regex), skipping over the target string so the stream parsing position now sits after the match. A failure occurs if the target is not found. An alternative, that supports regex is String.extract().

Stream.skipWhitespace

Advances the stream to the first character that is not whitespace. A failure occurs if the stream is exhausted.

Stream.skipToNumber

Advances the stream to the next number (i.e. one of more continuous number characters). A failure occurs if the stream is exhausted.