f

package
v1.0.207 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v1.0.90

func Contains[T ~string | ~[]byte](t T) func(T) bool

Contains returns a function that checks whether a string or []byte contains a given substring.

func ContainsAnyChars added in v1.0.90

func ContainsAnyChars[T ~string | ~[]byte](t T) func(T) bool

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

func EndsWith[T ~string | ~[]byte](t T) func(T) bool

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

func Eqd[T any](t T) func(T) bool

Eqd returns a comparison function that evaluates to true when a value is deeply equal to the provided threshold.

func Gt

func Gt[T cmp.Ordered](t T) func(T) bool

Gt returns a comparison function that evaluates to true when a value is greater than the threshold.

func Gte added in v1.0.68

func Gte[T cmp.Ordered](t T) func(T) bool

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

func IsComparable[T any](t T) bool

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 IsZero

func IsZero[T cmp.Ordered](v T) bool

IsZero is a generic function designed to check if a value is considered zero.

func Lt

func Lt[T cmp.Ordered](t T) func(T) bool

Lt returns a comparison function that evaluates to true when a value is less than the threshold.

func Lte added in v1.0.68

func Lte[T cmp.Ordered](t T) func(T) bool

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

func Match[T ~string | ~[]byte](t *regexp.Regexp) func(T) bool

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

func Ned[T any](t T) func(T) bool

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

func StartsWith[T ~string | ~[]byte](t T) func(T) bool

StartsWith returns a function that checks whether a string starts with a given prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL