Module nstd::core::slice

source · []
Expand description

A dynamically-sized view into a contiguous sequence of values.

Structs

Represents a view into a sequence of data.

Functions

Checks if two slices carry the same data.

Checks if a slice contains element.

Copies elements from s2 to s1. The slices must be the same size in bytes.

Counts the number of elements found in slice.

Checks if a slice ends with another slice.

Fills a slice with element.

Fills a specific range of a slice with element.

Finds the first element in slice and returns the index of the element.

Finds the last element in slice and returns the index of the element.

Gets the first element in the slice.

Gets a pointer to an element from a slice.

Gets the last element in the slice.

Moves bytes from s2 to s1, sets all s2 bytes to 0.

Creates a new slice from raw data.

Reverses a slice’s elements.

Shifts a slice x times to the left.

Shifts a slice x times to the right.

Checks if a slice starts with another slice.

Swaps two elements in a slice.

Swaps the elements of s1 and s2. The slices must be the same size in bytes.