Documentation ¶
Index ¶
- func AddOrReplaceT[T any](in []T, t T, is func(T) bool) []T
- func Append(from, to []string) []string
- func AppendT[T any](from, to []T, exist func(T, T) bool) []T
- func ContainAll(s1, s2 []string) bool
- func Distinct(in []string) []string
- func Equal(s1, s2 []string) bool
- func Exist(s []string, v string) bool
- func ExistT[T any](s []T, equal func(T) bool) bool
- func FilterByNonEmpty(in []string) []string
- func FilterT[T any](in []T, is func(T) bool) []T
- func FindLastOccurrenceIn(from, to []string) string
- func FindNextEl(s []string, v string) string
- func FindT[T any](in []T, is func(T) bool) *T
- func FlatTransformT[F any, T any](from []F, transform func(F) ([]T, error)) []T
- func Must(s1, s2 []string) bool
- func NewSliceS(in []string) sliceS
- func Sort(s []string) []string
- func SortT[T any](s []T, less func(T, T) bool) []T
- func ToMap(in []string) map[string]string
- func ToStringT[T any](in []T, transform func(T) *string, separator string) string
- func TransformT[F any, T any](from []F, transform func(F) (*T, error)) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOrReplaceT ¶
AddOrReplaceT adds or replaces {t} in the slice {in} using the provided {is} function.
func Append ¶
Append appends the slice {to} into the slice {from} without duplicated values (case-insensitive).
func AppendT ¶
Append appends the slice {to} into the slice {from} without duplicated values using the provided {exist} function.
func ContainAll ¶
ContainAll returns {true} if every value of the slice {s1} is in the slice {s2} (case-insensitive).
func Equal ¶
Equal returns {true} if the two slices contain exactly the same values (case-insensitive).
func FilterByNonEmpty ¶
FilterByNonEmpty removes all empty values in the slice {in}.
func FindLastOccurrenceIn ¶
FindLastOccurrenceIn finds last occurrence in the slice {from} of the slice {to},
returns empty if no occurrence found.
func FindNextEl ¶
FindNextEl finds the next element after the value {v} in the slice {s}.
func FlatTransformT ¶
FlatTransformT transforms and flattens the slice {from} []F to the slice []T using the provided {transform} function.
func Must ¶
Must returns {true} if the two slices contain exactly in the same order the same values (case-insensitive).
func ToStringT ¶
ToString concatenates the slice {in} to a single string using the provided {transform} function.
func TransformT ¶
TransformT transforms the slice {from} []F to the slice []T using the provided {transform} function.
Types ¶
This section is empty.