Documentation ¶
Index ¶
- Constants
- func BinaryToDecimal(bit string) (num int)
- func ConvertToString(v interface{}) (str string)
- func FilterIntSlice(src []int, dst []int) (result []int)
- func FilterSlice(src []int, dst []int) (result []int)
- func FilterStringSlice(src []string, dst []string) (result []string)
- func Float32ToString(floatNum float32, prec ...int) (floatStr string)
- func Float64ToString(floatNum float64, prec ...int) (floatStr string)
- func FormatURLParam(body map[string]interface{}) (urlParam string)
- func Int2String(intNum int) (intStr string)
- func Int642String(intNum int64) (int64Str string)
- func JoinInts(is []int64) string
- func MergeSliceRemoveDuplicate(slice1, slice2 []int) (merged []int)
- func RandomNumber(l int) string
- func RandomPureString(l int) string
- func RandomString(l int) string
- func SplitInts(s string) ([]int64, error)
- func String2Float32(floatStr string) (floatNum float32)
- func String2Float64(floatStr string) (floatNum float64)
- func String2Int(intStr string) (intNum int)
- func String2Int64(intStr string) (int64Num int64)
- func VerifyIDCard(idCard string) bool
- func VerifyPhoneNumber(phone string) bool
Constants ¶
View Source
const (
NULL = ""
)
Variables ¶
This section is empty.
Functions ¶
func ConvertToString ¶
func ConvertToString(v interface{}) (str string)
func FilterIntSlice ¶ added in v1.0.7
过滤数组,去除src中item,在dst中存在的item src[1,2,3,4,5] dst[2,4,6,8] result[1,3,5]
func FilterStringSlice ¶ added in v1.0.7
过滤数组,去除src中item,在dst中存在的item src["a","b","c","d","e"] dst["b","d","f","h"] result["a","c","e"]
func FormatURLParam ¶ added in v1.0.1
func MergeSliceRemoveDuplicate ¶
int数组合并,去重复
func VerifyIDCard ¶
计算规则参考“中国国家标准化管理委员会”官方文档:http://www.gb688.cn/bzgk/gb/newGbInfo?hcno=080D6FBF2BB468F9007657F26D60013E 身份证号码校验
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.