isASCII returns true if all the characters in s are ASCII.
(s string)
| 12 | |
| 13 | // isASCII returns true if all the characters in s are ASCII. |
| 14 | func isASCII(s string) bool { |
| 15 | for _, c := range s { |
| 16 | if c > unicode.MaxASCII { |
| 17 | return false |
| 18 | } |
| 19 | } |
| 20 | return true |
| 21 | } |
| 22 | |
| 23 | // IsDigit returns true if the character is between 0 and 9. |
| 24 | func IsDigit(ch int) bool { |
no outgoing calls
no test coverage detected
searching dependent graphs…