graphmine-util / io.github.sof3.graphmine.util.string / FormattedStringReader
data class FormattedStringReader
| <init> | FormattedStringReader(string: String) |
| isComplete | val isComplete: BooleanReturns whether the reader reached the end of string |
| pointer | var pointer: Int |
| remaining | val remaining: StringPeeks everything remaining in the string. Does not consume anything. |
| string | val string: String |
| exactly | fun exactly(vararg oneOf: String, suffix: String = ""): String?
Returns the first value in oneOf that the remaining string starts with. Returns null if none is found. |
| exec | fun exec(fn: () -> Unit): Unit
Executes a function that may modify the state of this object, but upon completion, the state is reset. |
| nextChar | fun nextChar(): Char?
Consumes and returns the next character. |
| nextDelimiter | fun nextDelimiter(vararg delimiters: String = arrayOf(" ")): DelimiterResult?
fun nextQuoted(open: Char = '"', close: Char = open, delimiter: Char = ' ', openEscape: Char? = '\\', closeEscape: Char? = openEscape, delimiterEscape: Char? = null, dumb: Boolean = false): QuotedResult?nextDelimiter(delimiter), but if open is found in the token, the reader will read until the next close regardless of delimiter, and continue reading with the same rule until a delimiter beyond a pair of open/close is found or the string comes to the end. |