1 Star 0 Fork 0

唯哈希 / GUtils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
string.go 547 Bytes
一键复制 编辑 原始数据 按行查看 历史
唯哈希 提交于 2023-02-22 19:27 . update
package gutils
import "regexp"
var (
RESpace = regexp.MustCompile(`\s+`) // Empty string
RENumber = regexp.MustCompile(`([0-9\.]+)`) // Number
REHex = regexp.MustCompile(`([a-fA-F0-9]+)`) // Hes
RETimeRange = regexp.MustCompile(`\d{4}-\d{2}-\d{2}(\s*) - (\s*)\d{4}-\d{2}-\d{2}`) // Date range
)
func StrDeleteSpace(str string) string {
if str == "" {
return str
}
return RESpace.ReplaceAllString(str, "")
}
Go
1
https://gitee.com/vhash/gutils.git
git@gitee.com:vhash/gutils.git
vhash
gutils
GUtils
v0.8.1

搜索帮助

53164aa7 5694891 3bd8fe86 5694891