Documentation ¶
Index ¶
- Constants
- func BytesToString(b []byte) string
- func CompleteUrlHttp(url string) string
- func CompleteUrlHttps(url string) string
- func Contains(s, sep string) bool
- func GenerateId(customId string) string
- func GenerateIdAndTime(customId, customTime string) string
- func GenerateIdAndTimeLength(customId, customTime string, dataLength int) string
- func GenerateIdLength(customId string, dataLength int) string
- func GenerateRandom(length, count int) []int
- func GenerateRandomFunc(length, count int, dFun func(num int) bool) []int
- func GenerateRandomNumber(start, end, count int, dFun func(num int) bool) []int
- func GenerateRandomString(length, count int) []string
- func GenerateRandomStringFunc(length, count int, dFun func(num string) bool) []string
- func GenerateRandomStringNumber(start, end, count int, alphabet string, length int, dFun func(num string) bool) []string
- func GetDefault(key, defVal any) any
- func GetString(i interface{}) string
- func GetStringDefault(key, defVal string) string
- func GetUuId() string
- func HmacSha256Hex(key, strToSign string) string
- func IsNotChinese(s string) bool
- func IsNotChineseOrDigit(s string) bool
- func IsNotDigit(s string) bool
- func LineBreak(str string) string
- func NumericalToString(value interface{}) (string, bool)
- func Replace(str, old, new string) string
- func Space(str string) string
- func SpaceAndLineBreak(str string) string
- func Split(s string, sep string) []string
- func StringToBytes(s string) []byte
- func ToFloat64(s string) float64
- func ToInt(s string) int
- func ToInt64(s string) int64
- func ToLower(s string) string
- func ToString(value interface{}) string
- func ToUint(s string) uint
- func ToUint64(s string) uint64
- func ToUpper(s string) string
- func TrimLastChar(s string) string
- type Only
Constants ¶
View Source
const Version = "1.0.21"
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
func GenerateIdAndTime ¶
GenerateIdAndTime 生成18位编号
func GenerateIdAndTimeLength ¶
GenerateIdAndTimeLength 生成自定义长度编号
func GenerateIdLength ¶
GenerateIdLength 生成自定义长度编号
func GenerateRandom ¶
GenerateRandom 生成count个长度length不重复的随机数
func GenerateRandomFunc ¶
GenerateRandomFunc 生成count个长度length不重复的随机数,支持外部查询
func GenerateRandomNumber ¶
GenerateRandomNumber 生成count个[start,end)结束的不重复的随机数
func GenerateRandomString ¶
GenerateRandomString 生成count个长度length不重复的随机数
func GenerateRandomStringFunc ¶
GenerateRandomStringFunc 生成count个长度length不重复的随机数,支持外部查询
func GenerateRandomStringNumber ¶
func GenerateRandomStringNumber(start, end, count int, alphabet string, length int, dFun func(num string) bool) []string
GenerateRandomStringNumber 生成count个[start,end)结束的不重复的随机数
func GetDefault ¶
func GetStringDefault ¶
func HmacSha256Hex ¶
func IsNotChinese ¶ added in v1.0.21
IsNotChinese 检查字符串包含中文字符 则返回 true;否则返回 false。
func IsNotChineseOrDigit ¶ added in v1.0.21
IsNotChineseOrDigit 检查字符串包含中文字符或数字字符 则返回 true;否则返回 false。
func IsNotDigit ¶ added in v1.0.21
IsNotDigit 检查字符串数字字符 则返回 true;否则返回 false。
func NumericalToString ¶
func StringToBytes ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.