readUntilDelimiters

fun Input.readUntilDelimiters(
    delimiter1: Byte,
    delimiter2: Byte,
    dst: ByteArray,
    offset: Int = 0,
    length: Int = dst.size
): Int

Copies to dst array at offset at most length bytes or until one of the specified delimiters delimiter1 or delimiter2 occurred.

Return number of bytes copied

fun Input.readUntilDelimiters(
    delimiter1: Byte,
    delimiter2: Byte,
    dst: Output
): Long

Copies to dst output until one of the specified delimiters delimiter1 or delimiter2 occurred.

Return number of bytes copied