Documentation
¶
Index ¶
- func AllControl(s string) bool
- func AllDigit(s string) bool
- func AllGraphic(s string) bool
- func AllLetter(s string) bool
- func AllLetterOrDigit(s string) bool
- func AllLower(s string) bool
- func AllMark(s string) bool
- func AllPrint(s string) bool
- func AllPunct(s string) bool
- func AllSpace(s string) bool
- func AllSymbol(s string) bool
- func AllTitle(s string) bool
- func AllUpper(s string) bool
- func Camel2Snake(s string) string
- func HasControl(s string) bool
- func HasDigit(s string) bool
- func HasGraphic(s string) bool
- func HasLetter(s string) bool
- func HasLetterOrDigit(s string) bool
- func HasLower(s string) bool
- func HasMark(s string) bool
- func HasPrint(s string) bool
- func HasPunct(s string) bool
- func HasSpace(s string) bool
- func HasSymbol(s string) bool
- func HasTitle(s string) bool
- func HasUpper(s string) bool
- func IsDigit[M string | []rune](r M) bool
- func IsUpper[M string | []rune](r M) bool
- func Quote(s string) string
- func QuotePure(s string) string
- func RandLetterNumbers(n int) string
- func RandLetters(n int) string
- func RandLowerLetterNumbers(n int) string
- func RandLowerLetters(n int) string
- func RandNumbers(n int) string
- func RandStringWithSeed(n int, seed []rune) string
- func RandUpperLetterNumbers(n int) string
- func RandUpperLetters(n int) string
- func Reverse(s string) string
- func SecureRandBytes(n int) ([]byte, error)
- func SecureRandHex(n int) (string, error)
- func SecureRandLetterNumbers(n int) (string, error)
- func SecureRandLetters(n int) (string, error)
- func SecureRandLowerLetterNumbers(n int) (string, error)
- func SecureRandLowerLetters(n int) (string, error)
- func SecureRandNumbers(n int) (string, error)
- func SecureRandString(n int) (string, error)
- func SecureRandUpperLetterNumbers(n int) (string, error)
- func SecureRandUpperLetters(n int) (string, error)
- func Shorten(s string, max int) string
- func ShortenShow(s string, max int) string
- func Snake2Camel(s string) string
- func Snake2SmallCamel(s string) string
- func SplitLen(s string, max int) []string
- func ToBytes(s string) []byte
- func ToCamel(s string) string
- func ToDot(s string) string
- func ToKebab(s string) string
- func ToSlash(s string) string
- func ToSmallCamel(s string) string
- func ToSnake(s string) string
- func ToString(b []byte) string
- func Utf16Len[M string | []rune | []byte](str M) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllControl ¶
func AllGraphic ¶
func AllLetterOrDigit ¶
func HasControl ¶
func HasGraphic ¶
func HasLetterOrDigit ¶
func RandLetterNumbers ¶
func RandLetters ¶
func RandLowerLetterNumbers ¶
func RandLowerLetters ¶
func RandNumbers ¶
func RandStringWithSeed ¶
func RandUpperLetterNumbers ¶
func RandUpperLetters ¶
func SecureRandBytes ¶
SecureRandBytes 生成指定长度的安全随机字节序列 使用 crypto/rand 生成密码学安全的随机数
func SecureRandHex ¶
SecureRandHex 生成指定长度的安全随机十六进制字符串 适用于生成token、密钥等
func SecureRandLetterNumbers ¶
SecureRandLetterNumbers 生成指定长度的安全随机字母数字字符串(大小写混合)
func SecureRandLetters ¶
SecureRandLetters 生成指定长度的安全随机字母字符串(大小写混合) 使用 crypto/rand 生成,适用于密码、验证码等安全场景
func SecureRandLowerLetterNumbers ¶
SecureRandLowerLetterNumbers 生成指定长度的安全随机小写字母数字字符串
func SecureRandLowerLetters ¶
SecureRandLowerLetters 生成指定长度的安全随机小写字母字符串
func SecureRandNumbers ¶
SecureRandNumbers 生成指定长度的安全随机数字字符串
func SecureRandString ¶
SecureRandString 生成指定长度的安全随机字符串(base64编码) 适用于生成会话ID、临时密钥等安全敏感场景
func SecureRandUpperLetterNumbers ¶
SecureRandUpperLetterNumbers 生成指定长度的安全随机大写字母数字字符串
func SecureRandUpperLetters ¶
SecureRandUpperLetters 生成指定长度的安全随机大写字母字符串
func ShortenShow ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.