Documentation
¶
Index ¶
- func Abs(number int) int
- func Abs64(number int64) int64
- func AddIndex[T comparable](index int, value T, slice []T) []T
- func Any[T comparable](slice []T, predicate func(T) bool) bool
- func Chunks[T any](slice []T, size int) [][]T
- func Concat(a, b int) int
- func DeepCopySlice[T any](slice []T) []T
- func Digits(num int) int
- func Digits64(num int64) int
- func DivMod(numerator, denominator int) (quotient, remainder int)
- func Every[T comparable](slice []T, predicate func(T) bool) bool
- func Fill[T any](item T, length int) []T
- func Filter[T any](slice []T, filter func(T) bool) []T
- func FirstOrDefault[T any](slice []T, predicate func(T) bool) T
- func Flat[T any](slice [][]T) []T
- func GCD(a, b int) int
- func IterToSlice[T any](iter iter.Seq[T]) []T
- func KeyByValue[K comparable, V comparable](m map[K]V, value V) K
- func LCM(a, b int, ints ...int) int
- func LastElement[T comparable](slice []T) T
- func Lines(text string) []string
- func MakeRange(min, max int) []int
- func MatchAllNamedSubgroups(exp *regexp.Regexp, input string) []map[string]string
- func MatchNamedSubgroups(exp *regexp.Regexp, input string) map[string]string
- func Matrix(text string, colSeparator string) [][]string
- func MinInt(a, b int) int
- func MinInt64(a, b int64) int64
- func MustParseInt(input string) int
- func MustParseInt64(text string) int64
- func PadNumber(nr int) string
- func Remove[T comparable](slice []T, elemToRemove T) []T
- func RemoveIndex[T comparable](index int, slice []T) []T
- func SortedKeys[K cmp.Ordered, V any](m map[K]V, desc bool) []K
- func SumInts(items []int) int
- func ToIntSlice(slice []string) []int
- func Transpose[T any](matrix [][]T) [][]T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIndex ¶
func AddIndex[T comparable](index int, value T, slice []T) []T
func Any ¶
func Any[T comparable](slice []T, predicate func(T) bool) bool
func DeepCopySlice ¶
func DeepCopySlice[T any](slice []T) []T
func Every ¶
func Every[T comparable](slice []T, predicate func(T) bool) bool
func FirstOrDefault ¶
func IterToSlice ¶
func KeyByValue ¶
func KeyByValue[K comparable, V comparable](m map[K]V, value V) K
func LastElement ¶
func LastElement[T comparable](slice []T) T
func MatchAllNamedSubgroups ¶
func MatchNamedSubgroups ¶
func MustParseInt ¶
func MustParseInt64 ¶
func Remove ¶
func Remove[T comparable](slice []T, elemToRemove T) []T
func RemoveIndex ¶
func RemoveIndex[T comparable](index int, slice []T) []T
func ToIntSlice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.