takeWhile

fun Source.takeWhile(block: (Buffer) -> Boolean)