substring

common
fun substring(beginIndex: Int = 0, endIndex: Int = size): ByteString

Returns a byte string that is a substring of this byte string, beginning at the specified beginIndex and ends at the specified endIndex. Returns this byte string if beginIndex is 0 and endIndex is the length of this byte string.

open fun substring(beginIndex: Int = 0, endIndex: Int = size): ByteString