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