Documentation
¶
Overview ¶
Package slices defines various functions useful with slices of string type. The goal is to be as close as possible to https://github.com/golang/go/issues/45955. Ideal would be if we can just replace "stringslices" if the "slices" package becomes standard.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
Equal reports whether two slices are equal: the same length and all elements equal. If the lengths are different, Equal returns false. Otherwise, the elements are compared in index order, and the comparison stops at the first unequal pair.
func Filter ¶
Filter appends to d each element e of s for which keep(e) returns true. It returns the modified d. d may be s[:0], in which case the kept elements will be stored in the same slice. if the slices overlap in some other way, the results are unspecified. To create a new slice with the filtered results, pass nil for d.
Types ¶
This section is empty.