package
0.1.11
Repository: https://github.com/sllt/af.git
Documentation: pkg.go.dev

# Functions

ContainChinese check if the string contain mandarin chinese.
ContainLetter check if the string contain at least one letter.
ContainLower check if the string contain at least one lower case letter a-z.
ContainLetter check if the string contain at least one number.
ContainUpper check if the string contain at least one upper case letter A-Z.
IsAllLower check if the string is all lower case letters a-z.
IsAllUpper check if the string is all upper case letters A-Z.
IsAlpha checks if the string contains only letters (a-zA-Z).
IsAmericanExpress check if a give string is a valid american expression card nubmer or not.
IsASCII checks if string is all ASCII char.
IsBase64 check if the string is base64 string.
IsBase64URL check if a give string is a valid URL-safe Base64 encoded string.
IsBin check if a give string is a valid binary value or not.
IsChinaUnionPay check if a give string is a valid china union pay nubmer or not.
IsChineseIdNum check if the string is chinese id card.
IsChineseMobile check if the string is chinese mobile number.
IsChinesePhone check if the string is chinese phone number.
IsCreditCard check if the string is credit card.
IsDns check if the string is dns.
IsEmail check if the string is a email address.
IsEmptyString check if the string is empty.
IsFloat check if the value is float(float32, float34) or not.
IsFloatStr check if the string can convert to a float.
IsGBK check if data encoding is gbk Note: this function is implemented by whether double bytes fall within the encoding range of gbk, while each byte of utf-8 encoding format falls within the encoding range of gbk.
IsHex check if a give string is a valid hexadecimal value or not.
IsInt check if the value is integer(int, unit) or not.
IsIntStr check if the string can convert to a integer.
IsIp check if the string is a ip address.
IsIpV4 check if the string is a ipv4 address.
IsIpV6 check if the string is a ipv6 address.
IsJSON checks if the string is valid JSON.
IsJWT check if a give string is a valid JSON Web Token (JWT).
IsMasterCard check if a give string is a valid master card nubmer or not.
IsNumberStr check if the value is number(integer, float) or not.
IsNumberStr check if the string can convert to a number.
IsPort check if the string is a valid net port.
IsPrintable checks if string is all printable chars.
IsRegexMatch check if the string match the regexp.
IsStrongPassword check if the string is strong password, if len(password) is less than the length param, return false Strong password: alpha(lower+upper) + number + special chars(!@#$%^&*()?><).
IsUnionPay check if a give string is a valid union pay nubmer or not.
IsUrl check if the string is url.
IsVisa check if a give string is a valid visa card nubmer or not.
IsWeakPassword check if the string is weak password Weak password: only letter or only number or letter + number.
IsZeroValue checks if value is a zero value.