Documentation ¶
Index ¶
- func All(vs []string, f func(string) bool) bool
- func Any(vs []string, f func(string) bool) bool
- func Filter(vs []string, f func(string) bool) []string
- func GetDigitAndCharCount(str string, val ...rune) int
- func GetDigitsCount(str string) int
- func GetHash32(strslice []string) uint32
- func Map(vs []string, f func(string) string) []string
- func Max(x, y int) int
- func MaxIntSlice(v []int) (m int)
- func MaxIntVarible(v1 int, vn ...int) (m int)
- func Min(x, y int) int
- func MinInt64(x, y int64) int64
- func MinIntSlice(v []int) (m int)
- func MinIntVarible(v1 int, vn ...int) (m int)
- func Slice(args ...interface{}) []interface{}
- func SortedKeysString(m map[string]interface{}, reverse bool) []string
- func StringContainsAll(line string, patterns []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
All returns true if all of the strings in the slice satisfy the predicate f. Example: fmt.Println(All(strs, func(v string) bool { return strings.HasPrefix(v, "p") }))
func Any ¶
Any returns true if one of the strings in the slice satisfies the predicate f. Example: fmt.Println(Any(strs, func(v string) bool { return strings.HasPrefix(v, "p") }))
func Filter ¶
Filter returns a new slice containing all strings in the slice that satisfy the predicate f. Example: fmt.Println(Filter(strs, func(v string) bool { return strings.Contains(v, "e") }))
func GetDigitAndCharCount ¶
GetDigitAndCharCount returns the count of char and digits
func GetDigitsCount ¶
GetDigitsCount counts the number of digits in the string
func Map ¶
Map returns a new slice containing the results of applying the function f to each string in the original slice. Example: fmt.Println(Map(strs, strings.ToUpper))
func MaxIntSlice ¶
MaxIntSlice returns the maximum from an int slice
func MaxIntVarible ¶
MaxIntVarible returns the maximum from variadic arguments
func MinIntSlice ¶
MinIntSlice returns the minimum from int slice. Zero is returned if slice is empty
func MinIntVarible ¶
MinIntVarible returns the minimum from variadic arguments
func Slice ¶
func Slice(args ...interface{}) []interface{}
Slice returns a slice out of variadic arguments
func SortedKeysString ¶
SortedKeysString returns sorted string keys
func StringContainsAll ¶
StringContainsAll returns true when all the patterns are present in the string 'line'
Types ¶
This section is empty.