StringReader

class StringReader(s: String)

Portable implementation of a character stream whose source is a string.

class StringReader(s: String)

Portable (non-jvm) implementation of a character stream whose source is a string.

typealias StringReader = StringReader

Constructors

StringReader
Link copied to clipboard
fun StringReader(s: String)

Functions

mark
Link copied to clipboard
common
fun mark(readAheadLimit: Int)

Marks the stream's current position. Calling reset() reverts the stream to this position.

read
Link copied to clipboard
common
fun read(): Int

Reads a single character.

reset
Link copied to clipboard
common
fun reset()

Resets the stream to the last marked position. If mark() was never called, the stream resets to the beginning of the string.

skip
Link copied to clipboard
common
fun skip(ns: Long): Long

Skips a specified amount of characters in the stream, returning the amount of characters actually skipped.