Documentation ¶
Index ¶
- Variables
- func FilterEmptyChar(str string) string
- func IsMd5(input string) error
- func Md5(str string) string
- func PadCnSpaceChar(label string, spaces int) string
- func RandNumStr(length int) (string, error)
- func RandomId() string
- func RegexpMatch(text string, pattern string) bool
- func ToInt64(str string) (int64, error)
- func ToPrintJSON(v interface{}) (string, error)
- func ToUint32(str string) uint32
- func UUIDNoDash() string
- func UniqueStrings(input []string) []string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidMD5Length = errors.New("invalid length for MD5 hash") ErrInvalidMD5Pattern = errors.New("value does not match MD5 hash pattern") )
校验是否 MD5 字符串的错误定义
Functions ¶
func PadCnSpaceChar ¶
PadCnSpaceChar 使用中文空格为字符串填充
func RandNumStr ¶ added in v1.8.22
RandNumStr 生成一个指定长度的随机数字字符串
func ToPrintJSON ¶
ToPrintJSON 将结构体转换为适合打印的格式化的 JSON 字符串
func UniqueStrings ¶
UniqueStrings 返回一个新的切片,其中包含原切片中的唯一字符串
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.