std/core/bslice▲toc

Byte slices

Todo: add iteration (foreach, prev, next etc).

type bslicestd/core/bslice/bslice: V

A byte slice represents a range of bytes in a bytesstd/core/types/bytes: V type.

O(1). Advance the start position of a byte slice by count bytes up to the end of the byte array. A negative count advances the start position backwards up to index 0.

O(1). Return the byte slice from the end of the slicestd/core/bslice/slice: (b : bytes) -> bslice argument to the end of the byte array.

O(1). Return the byte slice from the start of the bytes up to the start of the slicestd/core/bslice/slice: (b : bytes) -> bslice argument.

Get the bytes referenced by the slice.

An empty byte slice.

O(1). Extend a byte slice range by count bytes up to the end of the byte slice. A negative count shrinks the slice up to the empty slice.

Create a byte slice from bytes.

O(1). Get a subslice of len bytes from start in a given byte slice.

O(1). Take the first n bytes of the slice.

private import std/core/debugstd/core/debug, std/core/bytesstd/core/bytes, std/core/typesstd/core/types, std/core/intstd/core/int, std/core/exnstd/core/exn, std/core/liststd/core/list, std/core/hndstd/core/hnd