Created
May 11, 2022 06:24
-
-
Save WGrape/e6970dd35d3a42998bb35f389079f969 to your computer and use it in GitHub Desktop.
The common utils in golang.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
import "unicode" | |
// IsDigitString 是否为数字字符串 | |
func IsDigitString(str string) bool { | |
for _, x := range []rune(str) { | |
if !unicode.IsDigit(x) { | |
return false | |
} | |
} | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment