Documentation ¶
Overview ¶
Package slices contains functions for working on specific slice types.
Index ¶
- type Int64
- func (l Int64) All(f func(int64) bool) bool
- func (l Int64) Any(f func(int64) bool) bool
- func (l *Int64) Append(s ...int64) Int64
- func (l Int64) Contains(t int64) bool
- func (l *Int64) Delete(i int) error
- func (l Int64) Index(t int64) int
- func (l Int64) Len() int
- func (l Int64) Less(i, j int) bool
- func (l *Int64) Map(f func(int64) int64) Int64
- func (l *Int64) Reduce(f func(int64) bool) Int64
- func (l Int64) Reverse() Int64
- func (l Int64) Sort() Int64
- func (l Int64) Sum() int64
- func (l Int64) Swap(i, j int)
- func (l Int64) ToInt64() []int64
- func (l *Int64) Unique() Int64
- func (l *Int64) Update(i int, s int64) error
- type String
- func (l String) All(f func(string) bool) bool
- func (l String) Any(f func(string) bool) bool
- func (l *String) Append(s ...string) String
- func (l String) Contains(t string) bool
- func (l String) ContainsReverse(s string) bool
- func (l *String) Delete(i int) error
- func (l String) Filter(f func(string) bool) String
- func (l String) Index(t string) int
- func (l String) Join(sep string) string
- func (l String) Len() int
- func (l String) Less(i, j int) bool
- func (l *String) Map(f func(string) string) String
- func (l *String) Reduce(f func(string) bool) String
- func (l *String) ReduceContains(in ...string) String
- func (l *String) Shuffle() String
- func (l String) Sort() String
- func (l *String) Split(s, sep string) String
- func (l *String) SplitStringer8(n string, ps ...uint8) String
- func (l String) StartsWithReverse(s string) bool
- func (l String) Swap(i, j int)
- func (l String) ToString() []string
- func (l *String) Unique() String
- func (l *String) Update(i int, s string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int64 ¶
type Int64 []int64
Int64Slice contains Map/Filter/Reduce/Sort/Unique/etc method receivers for []int64. @todo think about the necessary gen functions +gen slice:"Where,Count,GroupBy[int64]"
func (*Int64) Map ¶
Map changes itself containing the results of applying the function f to each int64 in itself.
type String ¶
type String []string
String contains Map/Filter/Reduce/Sort/Unique/etc method receivers for []string.
func (String) ContainsReverse ¶
ContainsReverse checks if the StringSlice has at least one occurrence in the string s.
func (String) Filter ¶
Filter filters all strings in the slice that satisfy the predicate f and returns a new slice.
func (*String) Map ¶
Map changes itself containing the results of applying the function f to each string in itself.
func (*String) Reduce ¶
Reduce reduces itself containing all strings in the slice that satisfy the predicate f.
func (*String) ReduceContains ¶
ReduceContains reduces itself if the parts of the in slice are contained within itself.
func (*String) SplitStringer8 ¶
SplitStringer8 uses a name and position indexes to split the name and appends the parts to the slice. Cracking the names and indexes which the stringer command generates.
func (String) StartsWithReverse ¶
StartsWithReverse checks if the StringSlice can be found at least once in the provided string s.