Documentation ¶
Index ¶
- Constants
- func Compact(array []string) []string
- func Contained(arr []string, flag string) (b bool)
- func Contains(arr []string, flag string) (b bool)
- func ContainsBy(arr []string, fn func(str string) bool) (b bool)
- func ContainsChineseChar(str string) bool
- func First(array []string) string
- func HasPrefix(arr []string, prefix string) (b bool)
- func HasSuffix(arr []string, suffix string) (b bool)
- func Last(array []string) string
- func Nth(array []string, idx int) string
- func RandomAlphabet(n int) string
- func RandomAlphanumeric(n int) string
- func RandomNumber(n int) string
- func ShortID() string
Constants ¶
View Source
const ( Number = "0123456789" Alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" Alphanumeric = Alphabet + Number )
Variables ¶
This section is empty.
Functions ¶
func ContainsBy ¶ added in v1.0.0
ContainsBy check any element in arr by fn
func ContainsChineseChar ¶ added in v1.0.0
ContainsChineseChar check str contains chinese char
func RandomAlphabet ¶ added in v1.0.0
RandomAlphabet return a random n length string of alphabet.
func RandomAlphanumeric ¶ added in v1.0.0
RandomAlphanumeric return a random n length string of alphanumeric.
func RandomNumber ¶ added in v1.0.0
RandomNumber return a random n length string of number.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.