utils

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

README

utils

Documentation

Index

Constants

View Source
const AllLettersAndDigits = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" // 大小写字母 + 数字
View Source
const LowercaseCharset = "abcdefghijklmnopqrstuvwxyz0123456789" // 小写字母 + 数字

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(length int, charset string) (string, error)

GenerateRandomString 生成指定长度的随机字符串

func ValidateString

func ValidateString(s string, minLength, maxLength int) bool

ValidateString 校验字符串只能包含小写字母或数字,并且长度在[minLength, maxLength]范围内

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL