SourceCharacterInputStream

An implementation of CharacterInputStream using just a string as argument

Since

0.1.0

Parameters

source

the source of the SourceCharacterInputStream

Constructors

Link copied to clipboard
constructor(source: String, content: CharArray)

Constructor for SourceCharacterInputStream with given position

constructor(source: String, content: String)

Constructor for SourceCharacterInputStream with given position

constructor(source: CharacterSource)

Properties

Link copied to clipboard
open override val content: CharArray

Returns the chars of the CharacterInputStream

Link copied to clipboard
open override val position: Int

Returns the actual position of the CharacterInputStream

Link copied to clipboard
open override val positionMaker: PositionMaker

The actual position of the SourceCharacterInputStream

Link copied to clipboard
open override val source: CharacterSource

The source (mostly file) of the SourceCharacterInputStream

Functions

Link copied to clipboard
open override fun actual(): Char

Returns the actual character (the same as returned by .next when used before)

Link copied to clipboard
open override fun has(number: Int): Boolean

Checks if the CharacterInputStream has a given number of characters left

Link copied to clipboard
open operator override fun hasNext(): Boolean

Checks if the CharacterInputStream has a next character left

Link copied to clipboard
open operator override fun next(): Char

Returns the next character and continues to the next token

Link copied to clipboard
open override fun peek(): Char
open override fun peek(num: Int): Char

Gives back the next character without skipping

open override fun peek(from: Int, to: Int): String

Gives back a part of the CharacterInputStream as string (relative to the actual position)

Link copied to clipboard
open override fun skip()

Skips the next character

open override fun skip(number: Int)

Skips a given number of characters