consumeUntil

Helper function to consume string content from an input stream until a certain target pattern of characters is encountered.

Either!(string, "value", StreamError, "error")
consumeUntil
(
S
)
(,
string target
)
if (
isByteInputStream!S
)

Parameters

inputStream S

The stream to read from.

target string

The target at which to stop reading.

Return Value

Type: Either!(string, "value", StreamError, "error")

The string that was read, or a stream error.