Documentation ¶
Index ¶
- func AnyFunc(s string, strs []string, f func(s, substr string) bool) bool
- func Empty(s *string) bool
- func EqualsIAny(s string, strs ...string) bool
- func HasAnyPrefix(s string, prefixes ...string) bool
- func HasAnyiPrefix(s string, prefixes ...string) bool
- func MustAtoi(s string) int
- func RandString(n int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyFunc ¶
AnyFunc checks if the `s` string is in any of the `strs` slices that satisfy the given `f` func
func EqualsIAny ¶
EqualsIAny checks if the string `s` is equal to any of the strings `strs`. Case insensitive and trims the strings.
func HasAnyPrefix ¶
HasAnyPrefix checks if any of the given `prefixes` are in the `s` string.
func HasAnyiPrefix ¶
HasAnyiPrefix checks if any of the given `prefixes` are in the `s` string. Case insensitive.
func MustAtoi ¶
MustAtoi converts an `s` string using `strconv.Atoi` but panics if there's an error.
func RandString ¶
RandString generates a random string of the length `n` with characters A-Z, a-z, and 0-9.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.