Documentation ¶
Index ¶
- func Base64DecodeStripped(s string) (string, error)
- func Base64Encode(data []byte) string
- func Contains(s, substr string) bool
- func CountOccurrences(s, substr string) int
- func CryptPassword(password, salt string) string
- func EndsWith(s, suffix string) bool
- func GenRandomString(length int, specialChar string) string
- func GenerateUUID() string
- func GetSubstring(s string, start, end int) string
- func IndexOf(s, substr string) int
- func IsAlpha(s string) bool
- func IsAlphanumeric(s string) bool
- func IsBlank(s string) bool
- func IsCreditCard(s string) bool
- func IsDate(s string) bool
- func IsEmail(s string) bool
- func IsEmpty(s string) bool
- func IsHex(s string) bool
- func IsJSON(s string) bool
- func IsLength(s string, min, max int) bool
- func IsNotBlank(s string) bool
- func IsNotEmpty(s string) bool
- func IsNumeric(s string) bool
- func IsPalindrome(s string) bool
- func IsPhoneNumber(s string) bool
- func IsStrongPassword(password string) bool
- func IsURL(s string) bool
- func Join(elems []string, sep string) string
- func LastIndexOf(s, substr string) int
- func Md5Sum(s string) string
- func NormalizeWhitespace(s string) string
- func RandString(length int) string
- func Repeat(s string, count int) string
- func Replace(s, old, new string, n int) string
- func Reverse(s string) string
- func Split(s, sep string) []string
- func StartsWith(s, prefix string) bool
- func ToLower(s string) string
- func ToTitle(s string) string
- func ToUpper(s string) string
- func Trim(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64DecodeStripped ¶
Base64DecodeStripped 解码Base64字符串,处理缺失的填充字符
func CountOccurrences ¶
CountOccurrences 统计子字符串在字符串中出现的次数
func CryptPassword ¶
CryptPassword 加密密码 password: 需要加密的密码 salt: 加盐
func GenRandomString ¶
GenRandomString 生成随机字符串 length: 生成字符串的长度 specialChar: 是否包含特殊字符("yes" 或 "no")
func NormalizeWhitespace ¶
NormalizeWhitespace 将多个空白字符替换为单个空格
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.