Documentation ¶
Overview ¶
Package slicex defines various functions useful with slices of any type. This is an extension to the slices package in the Go's standard library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
All returns true if predicate returns true for all elements in the slice. All returns true if the slice is empty.
func Any ¶
Any returns true if predicate returns true for any element in the slice. Any returns false if the slice is empty.
func Delete ¶
Delete removes the elements s[i:j] from s, modifies s in place. Delete panics if s[i:j] is not a valid slice of s. Delete is O(len(s)-j), so if many items must be deleted, it is better to make a single call deleting them all together than to delete one at a time. Delete might not modify the elements s[len(s)-(j-i):len(s)]. If those elements contain pointers Delete is zeroing those elements so that objects they reference will be garbage collected.
Types ¶
This section is empty.