common

package
v1.231122.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeCasId

func DecodeCasId(encodedStr string) uint32

func DecodeId

func DecodeId(idStr string) uint32

解码id

func EncodeCasId

func EncodeCasId(casId int64) string

func EncodeId

func EncodeId(id int64) string

对自增序列进行编码

func HasUnicodeHan

func HasUnicodeHan(str string) bool

func RandomInt

func RandomInt(min int, max int) int

func RandomString

func RandomString(l int) string

func SpecialLetters

func SpecialLetters(letter rune) (bool, []rune)

如果存在特殊字符,直接在特殊字符前添加 \\ 转义 * 判断是否为字母: unicode.IsLetter(v) 判断是否为十进制数字: unicode.IsDigit(v) 判断是否为数字: unicode.IsNumber(v) 判断是否为空白符号: unicode.IsSpace(v) 判断是否为Unicode标点字符 :unicode.IsPunct(v) 判断是否为中文:unicode.Han(v)

Types

This section is empty.

Jump to

Keyboard shortcuts

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