diff options
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -6,3 +6,12 @@ func trimInitialSpaces(line string) string { } return line[i:] } + +func isASCII(str string) bool { + for i := 0; i < len(str); i++ { + if str[i] > 127 { + return false + } + } + return true +} |