groostav
01/19/2025, 7:33 AMScanner
, but it demands delimeters that I dont want to give it.
I was also hoping kotli might have a kind of reader + regex extension function, something like <http://java.io|java.io>.Reader.takeWhile(regex: Regex)
, but no luck there either.
What does a quintessential kotlin text tokenizer look like?groostav
01/19/2025, 7:36 AMAdam S
01/19/2025, 2:47 PMAdam S
01/19/2025, 2:47 PMgroostav
01/20/2025, 9:27 AMgroostav
01/20/2025, 9:27 AMgroostav
01/20/2025, 9:28 AMgroostav
01/20/2025, 9:28 AMjava.io.Reader
Klitos Kyriacou
01/20/2025, 1:08 PMchars.use
it's recommended not to close Scanner
when it's been opened on an InputStream
that you haven't opened yourself. It's the caller's responsibility to close it.groostav
01/20/2025, 8:15 PMSequence