Usage
readUntil!(str, s, c)
readWhile!(str, s, read?)
skipUntil!(s, c)
skipWhile!(s, read?)
Signatures
readUntil!: (StringBuffer, %, Character) Character
readWhile!: (StringBuffer, %, Character Boolean)
Character
skipUntil!: (%, Character) Character
skipWhile!: (%, Character Boolean)
Character
Parameter | Type | Description |
---|---|---|
str | StringBuffer | a buffer |
s | % | a stream |
c | Character | a character |
read? | Character ![]() |
a predicate |
Description
readUntil!(str, s, c) reads characters from s and stores them in str, until the character c is read. Returns c if it is read, eof otherwise. readWhile!(str, s, read?) reads characters from s and stores them in str as long as read? is true on the characters read. Returns either the first character read for which read? is false or eof. skipUntil! and skipWhile! work like readUntil! and readWhile! except that the characters read are not stored anywhere.