修正gstr.IsNumeric错误

This commit is contained in:
John
2018-05-23 20:10:12 +08:00
parent 551679d9f8
commit 3ca7e4ab60

View File

@ -79,7 +79,7 @@ func IsLetterUpper(b byte) bool {
// 判断锁给字符串是否为数字
func IsNumeric(s string) bool {
for i := 0; i < len(s); i++ {
if s[i] < byte('0') && s[i] > byte('9') {
if s[i] < byte('0') || s[i] > byte('9') {
return false
}
}