Documentation
¶
Overview ¶
Package xslices is the addition/ extension to the official slices package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fill ¶
func Fill[S ~[]E, E any](slice S, value E)
Fill fills the slice with the provided value. Fill zeros the elements in the slice before overriding them.
This function is much faster than using [copy] – if you have many values (i.e. >10).
func FillValues ¶
func FillValues[S ~[]E, E any](slice S, values ...E)
FillValues fills the slice with the given values. It basically overrides all elements in slice with values. Fill zeros the elements in the slice before overriding them.
This function is much faster than using [copy] – if you have many values (i.e. >10).
WARN: The function panics if the length of values is greater than the length of slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.