string

package
v0.0.0-...-500bf97 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2String

func Bytes2String(b []byte) string

Bytes2String直接转换底层指针,两者指向的相同的内存,改一个另外一个也会变。 效率是string([]byte{})的百倍以上,且转换量越大效率优势越明显。

func HashToString

func HashToString(encode string) uint64

hash 转字符串 和stringToHash.go 配合使用

func IsNum

func IsNum(a string) bool

The IsNum judges string is number or not. 检查一个字符串是否是数字

func KeyinsParse

func KeyinsParse(keyins string) []string

切分用户输入的自定义信息

func MakeMd5

func MakeMd5(obj interface{}, length int) string

制作特征值方法二

func MakeUnique

func MakeUnique(obj interface{}) string

制作特征值方法一

func String2Bytes

func String2Bytes(s string) []byte

String2Bytes直接转换底层指针,两者指向的相同的内存,改一个另外一个也会变。 效率是string([]byte{})的百倍以上,且转换量越大效率优势越明显。 转换之后若没做其他操作直接改变里面的字符,则程序会崩溃。 如 b:=String2bytes("xxx"); b[1]='d'; 程序将panic。

func StringToHash

func StringToHash(s string) string

string to hash string 转 hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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