parse(through:)

Advances the current index until encountering the specified byte. After this method returns, index points to the byte after the matched byte.

BSON.Input.swift:52
@discardableResult mutating func parse(through byte: UInt8) throws -> Range<Int>

Returns

A range covering the bytes skipped. The upper-bound of the range points to the matched byte.