diff --git a/string.go b/string.go index e82bd91..d59aa5c 100644 --- a/string.go +++ b/string.go @@ -13,6 +13,7 @@ import ( "errors" "git.zhangdeman.cn/zhangdeman/serialize" "github.com/axgle/mahonia" + "github.com/spaolacci/murmur3" "io" "math/rand" "strings" @@ -1175,3 +1176,15 @@ func (str String) HasSubStr(subStrList []string) bool { } return false } + +// HashNumber ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 11:05 2024/6/27 +func (str String) HashNumber() Uint64Result { + return Uint64Result{ + Value: murmur3.Sum64([]byte(str.Value())), + Err: nil, + } +}