StringReader

Properties

Link copied to clipboard
abstract override var cursor: Int

The current cursor position.

Link copied to clipboard
open val previous: String

The substring from the start of the string to the current cursor position.

Link copied to clipboard
open val remaining: String

The substring from the current cursor position to the end of the string.

Link copied to clipboard

The number of characters remaining that may be read.

Link copied to clipboard
abstract val string: String

The underlying string.

Link copied to clipboard
open val totalLength: Int

The total number of characters in the string.

Functions

Link copied to clipboard
open fun canRead(): Boolean

Whether 1 character can be read.

open fun canRead(length: Int): Boolean

Whether length number of characters can be read.

Link copied to clipboard
abstract fun expect(c: Char)
Link copied to clipboard
open fun peek(): Char

Returns the character at the current cursor position but does not advance the cursor.

open fun peek(offset: Int): Char

Returns the character at the current cursor position + offset but does not advance the cursor.

Link copied to clipboard
abstract fun read(): Char
Link copied to clipboard
abstract fun readBoolean(): Boolean
Link copied to clipboard
abstract fun readDouble(): Double
Link copied to clipboard
abstract fun readFloat(): Float
Link copied to clipboard
abstract fun readInt(): Int
Link copied to clipboard
abstract fun readLong(): Long
Link copied to clipboard
abstract fun readQuotedString(): String
Link copied to clipboard
abstract fun readString(): String
Link copied to clipboard
abstract fun readStringUntil(terminator: Char): String
Link copied to clipboard
abstract fun readUnquotedString(): String
Link copied to clipboard
abstract fun skip()
Link copied to clipboard
abstract fun skipWhitespace()