StringReader
class in package klyn.io

    public class StringReader extends Object implements TextReader:

Object
└ StringReader
All Implemented Interfaces: TextReader

Text reader backed by an in-memory string.

`StringReader` is useful for APIs that consume a `TextReader`, such as XML parsers, without creating a temporary file.

@example ```klyn import klyn.io

reader = StringReader("first\nsecond") print(reader.readLine()) print(reader.readAllText())

Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | StringReader `StringReader(text as String):` | Creates a reader over a string.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | close `close() as Void:` | Closes the reader.
public | readAllText `readAllText() as String throws IOException:` | Reads the remaining text.
public | readLine `readLine() as String throws IOException:` | Reads one line from the current reader position.
public | readLines `readLines() as ArrayList<String> throws IOException:` | Reads all remaining lines from the current reader position.

Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from TextReader: readAllText, readLine, readLines
Methods inherited from AutoClosable: close