Skip to content

okio / okio / ByteString / rangeEquals

rangeEquals

(js, jvm) fun rangeEquals(offset:Int, other:ByteString, otherOffset:Int, byteCount:Int):Boolean(native) open fun rangeEquals(offset:Int, other:ByteString, otherOffset:Int, byteCount:Int):Boolean (js, jvm) fun rangeEquals(offset:Int, other:ByteArray, otherOffset:Int, byteCount:Int):Boolean(native) open fun rangeEquals(offset:Int, other:ByteArray, otherOffset:Int, byteCount:Int):Boolean

Returns true if the bytes of this in [offset..offset+byteCount) equal the bytes of other in [otherOffset..otherOffset+byteCount). Returns false if either range is out of bounds.