ByteRange

ByteRange :: # (opaque)

A half-open range of UTF-8 bytes in an original text source.

from_bounds : U64, U64 -> Try(ByteRange, BoundsError)

Construct [start, end). Empty ranges are valid.

slice : ByteRange, Str -> Try(Str, SliceError)

Select this range as a seamless slice of source.

The returned string retains the source backing allocation and does not copy the selected bytes.