Documentation
¶
Index ¶
- func Contains[T ~string | ~[]byte](t T) func(T) bool
- func ContainsAnyChars[T ~string | ~[]byte](t T) func(T) bool
- func EndsWith[T ~string | ~[]byte](t T) func(T) bool
- func Eq[T comparable](t T) func(T) bool
- func Eqd[T any](t T) func(T) bool
- func Gt[T cmp.Ordered](t T) func(T) bool
- func Gte[T cmp.Ordered](t T) func(T) bool
- func IsComparable[T any](t T) bool
- func IsEven[T constraints.Integer](i T) bool
- func IsOdd[T constraints.Integer](i T) bool
- func IsZero[T cmp.Ordered](v T) bool
- func Lt[T cmp.Ordered](t T) func(T) bool
- func Lte[T cmp.Ordered](t T) func(T) bool
- func Match[T ~string | ~[]byte](t *regexp.Regexp) func(T) bool
- func Ne[T comparable](t T) func(T) bool
- func Ned[T any](t T) func(T) bool
- func StartsWith[T ~string | ~[]byte](t T) func(T) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶ added in v1.0.90
Contains returns a function that checks whether a string or []byte contains a given substring.
func ContainsAnyChars ¶ added in v1.0.90
ContainsAnyChars returns a function that checks whether a string contains any of the characters from a given set.
func EndsWith ¶ added in v1.0.90
EndsWith returns a function that checks whether a string ends with a given suffix.
func Eq ¶
func Eq[T comparable](t T) func(T) bool
Eq returns a comparison function that evaluates to true when a value is equal to the provided threshold.
func Eqd ¶ added in v1.0.68
Eqd returns a comparison function that evaluates to true when a value is deeply equal to the provided threshold.
func Gt ¶
Gt returns a comparison function that evaluates to true when a value is greater than the threshold.
func Gte ¶ added in v1.0.68
Gte returns a comparison function that evaluates to true when a value is greater than or equal to the threshold.
func IsComparable ¶ added in v1.0.91
IsComparable reports whether the value v is comparable.
func IsEven ¶
func IsEven[T constraints.Integer](i T) bool
IsEven is a generic function that checks if the provided integer is even.
func IsOdd ¶
func IsOdd[T constraints.Integer](i T) bool
IsOdd is a generic function that checks if the provided integer is odd.
func Lt ¶
Lt returns a comparison function that evaluates to true when a value is less than the threshold.
func Lte ¶ added in v1.0.68
Lte returns a comparison function that evaluates to true when a value is less than or equal to the threshold.
func Match ¶ added in v1.0.123
Match returns a function that checks whether a string or []byte matches a given regular expression.
func Ne ¶
func Ne[T comparable](t T) func(T) bool
Ne returns a comparison function that evaluates to true when a value is not equal to the provided threshold.
func Ned ¶ added in v1.0.68
Ned returns a comparison function that evaluates to true when a value is not deeply equal to the provided threshold.
func StartsWith ¶ added in v1.0.90
StartsWith returns a function that checks whether a string starts with a given prefix.
Types ¶
This section is empty.