readUntil

fun readUntil(text: String, errCondition: String): String

Returns contents of the stream up to but not including the given text and advances the position. Throws an exception if the text is not encountered before the end of the stream.

Return

The stream contents from the current position up to but not including text.

Parameters

text

The text to seek.

errCondition

The condition to include in an error message if necessary.