Skip to content

//core/io.islandtime.parser/DateTimeParserBuilder/string

string

common

abstract fun string(length: IntRange = IntRange.EMPTY, builder: StringParserBuilder.() -> Unit)

Parse a variable length string.

Each character will be parsed starting from the current position until either the maximum number of characters allowed by length is reached or parsing is stopped by a StringParserBuilder.onEachChar handler.

Parameters

common

length restricts the length of the string to a certain range -- no restrictions if the range is empty
builder configure the parser behavior