Documentation
¶
Index ¶
- Variables
- func As(slice []interface{}) (res []byte, err error)
- func Contains(haystack []byte, needle byte) bool
- func ContainsAll(haystack []byte, needles ...byte) bool
- func ContainsAny(haystack []byte, needles ...byte) bool
- func Cut(slice []byte, separator byte) (left, right []byte, found bool)
- func CutAny(val []byte, seperators ...byte) (left, right []byte, found bool)
- func CutAt(val []byte, index int) (left, right []byte)
- func Equal(a []byte, b []byte) bool
- func Fill(slice []byte, val byte) []byte
- func Index(haystack []byte, needle byte) int
- func Interface(slice []byte) (res []interface{}, err error)
- func Remove(slice []byte, offset int, values ...byte) (res []byte)
- func RemoveAt(slice []byte, index int) (res []byte)
- func Resize(s []byte, n int) (res []byte)
- func Sort(s []byte)
- func SortReverse(s []byte)
- func Split(slice []byte, separator byte) (parts [][]byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInterfaceNotByte = errors.New("encountered non-byte interface")
)
Functions ¶
func ContainsAll ¶
Check if a []byte slice contains ALL of the provided members
func ContainsAny ¶
Check if a []byte slice contains ANY of the provided members
func Index ¶
Find the index where the needle appears. Returns -1 if the needle doesn't appear in the slice.
func Remove ¶
Remove the first occurrence of each value from the slice starting from the supplied offset
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.