Discover Packages
github.com/czx-lab/czx
utils
xslices
package
Version:
v1.14.5
Opens a new window with list of versions in this module.
Published: Aug 20, 2026
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func Reverse[T any , S ~[]T](s S) S
Reverse reverses the order of elements in a slice.
It creates a new slice and returns it, leaving the original slice unchanged.
Search returns the index of the first element in s that satisfies f, or -1 if no such element exists.
It returns a boolean indicating whether the element was found.
func Shuffle[T any , S ~[]T](s S)
Shuffle randomly shuffles the elements of a slice in place.
It uses the rand.Shuffle function from the math/rand/v2 package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.