Apply .gitignore rules
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package stringUtil
|
||||
|
||||
import (
|
||||
"hash/crc32"
|
||||
)
|
||||
|
||||
// HashCode 获取字符串对应的hashCode值
|
||||
func HashCode(s string) int {
|
||||
v := int(crc32.ChecksumIEEE([]byte(s)))
|
||||
|
||||
if v < 0 {
|
||||
return -v
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
Reference in New Issue
Block a user