Documentation
¶
Index ¶
- Constants
- type IntC
- func (ic IntC) All(iteratee func(int, int, IntC) bool) bool
- func (ic IntC) Any(iteratee func(int, int, IntC) bool) bool
- func (ic IntC) Asc() IntC
- func (ic IntC) Avg() int
- func (ic IntC) Concat(collections ...IntC) IntC
- func (ic IntC) Contains(value int, from int, to int) bool
- func (ic IntC) Desc() IntC
- func (ic IntC) Each(iteratee func(int, int, IntC))
- func (ic IntC) Filter(iteratee func(int, int, IntC) bool) IntC
- func (ic IntC) Head() (int, error)
- func (ic IntC) IsAscSorted() bool
- func (ic IntC) IsDescSorted() bool
- func (ic IntC) IsSorted() bool
- func (ic IntC) Map(iteratee func(int, int, IntC) int) IntC
- func (ic IntC) Max(from int, to int) int
- func (ic IntC) Min(from int, to int) int
- func (ic IntC) None(iteratee func(int, int, IntC) bool) bool
- func (ic IntC) Partition(iteratee func(int, int, IntC) bool) (Left IntC, Right IntC)
- func (ic IntC) Push(values ...int) IntC
- func (ic IntC) PushUnique(values ...int) IntC
- func (ic IntC) Reduce(reducer func(int, int, int, IntC) int, initialValue int) int
- func (ic IntC) Reject(iteratee func(int, int, IntC) bool) IntC
- func (ic IntC) Remove(values ...int) IntC
- func (ic IntC) Reverse() IntC
- func (ic IntC) Sum() int
- func (ic IntC) Tail() IntC
- func (ic IntC) Unique() IntC
- type StringC
- func (sc StringC) All(iteratee func(string, int, StringC) bool) bool
- func (sc StringC) Any(iteratee func(string, int, StringC) bool) bool
- func (sc StringC) Asc() StringC
- func (sc StringC) Contains(value string, from int, to int) bool
- func (sc StringC) Desc() StringC
- func (sc StringC) Each(iteratee func(string, int, StringC))
- func (sc StringC) Filter(iteratee func(string, int, StringC) bool) StringC
- func (sc StringC) Head() (string, error)
- func (sc StringC) IsAscSorted() bool
- func (sc StringC) IsDescSorted() bool
- func (sc StringC) IsSorted() bool
- func (sc StringC) Join(sep string) string
- func (sc StringC) Map(iteratee func(string, int, StringC) string) StringC
- func (sc StringC) Max(from int, to int) string
- func (sc StringC) Min(from int, to int) string
- func (sc StringC) None(iteratee func(string, int, StringC) bool) bool
- func (sc StringC) Partition(iteratee func(string, int, StringC) bool) (Left StringC, Right StringC)
- func (sc StringC) Push(values ...string) StringC
- func (sc StringC) PushUnique(values ...string) StringC
- func (sc StringC) Reduce(reducer func(string, string, int, StringC) string, initialValue string) string
- func (sc StringC) Reject(iteratee func(string, int, StringC) bool) StringC
- func (sc StringC) Remove(values ...string) StringC
- func (sc StringC) Tail() StringC
- func (sc StringC) Unique() StringC
Constants ¶
const VERSION = "0.0.3"
VERSION contains the current version of this library
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntC ¶
type IntC []int
IntC is a Collection of Int values
func (IntC) All ¶
All - Takes a validation function. It calls the validaton function with all values and returns true if all calls returned "true". However, it will stop the moment the validation function returns "false".
func (IntC) Any ¶
Any - Similar to "All" and "None". But it will return "true" when at least one value returns "true".
func (IntC) Contains ¶
Contains - Checks if the slice contains a specific value. An offset and an endpoint can be present to constrain the search even further. If the values -1 are used for "from" and "to" they will fall back to their default values. from = 0; to = len(ic)
func (IntC) Filter ¶
Filter - Takes a validation function. This validation function checks if a given value is fullfilling all requirements. The result of this function contains only values where the validation function returns "true".
func (IntC) IsAscSorted ¶
IsAscSorted - Checks if the slice is sorted in ascending order.
func (IntC) IsDescSorted ¶
IsDescSorted - Checks if the slice is sorted in descending order.
func (IntC) Map ¶
Map - Takes a transform function. This transform function will be called with all values in the slice. A new slice will be generated with the new generated values.
func (IntC) Max ¶
Max - finds the max value in the slice. A "from" and "to" can be specified to constrain the search even further.
func (IntC) Min ¶
Min - finds the min value in the slice. A "from" and "to" can be specified to constrain the search even further.
func (IntC) Partition ¶
Partition - Takes a validaton function. It calls the the validaton function and creates two new slices based on the result. If the validaton function returns "true", it gets placed into the first slice. Otherwise it's in the second slice.
func (IntC) PushUnique ¶
PushUnique - Adds one or more values at the end of the slice if they're unique
func (IntC) Reduce ¶ added in v0.0.3
Reduce - Combines all entries in the collection based on a reducer method.
func (IntC) Reject ¶
Reject - Similar to Filter. The difference is, that only values will be added where the validaton function returns "false".
type StringC ¶
type StringC []string
StringC is a Collection of String Values
func (StringC) All ¶
All - Takes a validation function. It calls the validaton function with all values and returns true if all calls returned "true". However, it will stop the moment the validation function returns "false".
func (StringC) Any ¶
Any - Similar to "All" and "None". But it will return "true" when at least one value returns "true".
func (StringC) Contains ¶
Contains - Checks if the slice contains a specific value. An offset and an endpoint can be present to constrain the search even further. If the values -1 are used for "from" and "to" they will fall back to their default values. from = 0; to = len(ic)
func (StringC) Filter ¶
Filter - Takes a validation function. This validation function checks if a given value is fullfilling all requirements. The result of this function contains only values where the validation function returns "true".
func (StringC) IsAscSorted ¶
IsAscSorted - Checks if the slice is sorted in ascending order.
func (StringC) IsDescSorted ¶
IsDescSorted - Checks if the slice is sorted in descending order.
func (StringC) Join ¶ added in v0.0.3
Join - Joins all entries in a collection to a single string, seperated by a seperator.
func (StringC) Map ¶
Map - Takes a transform function. This transform function will be called with all values in the slice. A new slice will be generated with the new generated values.
func (StringC) Max ¶
Max - finds the max value in the slice. A "from" and "to" can be specified to constrain the search even further.
func (StringC) Min ¶
Min - finds the min value in the slice. A "from" and "to" can be specified to constrain the search even further.
func (StringC) Partition ¶
Partition - Takes a validaton function. It calls the the validaton function and creates two new slices based on the result. If the validaton function returns "true", it gets placed into the first slice. Otherwise it's in the second slice.
func (StringC) PushUnique ¶
PushUnique - Adds one or more values at the end of the slice if they're unique
func (StringC) Reduce ¶ added in v0.0.3
func (sc StringC) Reduce(reducer func(string, string, int, StringC) string, initialValue string) string
Reduce - Combines all entries in the collection based on a reducer method.
func (StringC) Reject ¶
Reject - Similar to Filter. The difference is, that only values will be added where the validaton function returns "false".