import (
"fmt"
"testing"
"unicode"
)
func TestRulex(t *testing.T) {
c:=isDigit("0234")
fmt.Println(c)
}
func isDigit(str string) bool{
for _,x:=range []rune(str){
if !unicode.IsDigit(x) {
return false
}
}
return true
}
import (
"fmt"
"testing"
"unicode"
)
func TestRulex(t *testing.T) {
c:=isDigit("0234")
fmt.Println(c)
}
func isDigit(str string) bool{
for _,x:=range []rune(str){
if !unicode.IsDigit(x) {
return false
}
}
return true
}