diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-08 08:42:11 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-08 08:44:04 +0800 |
commit | c6eacf7ef76fc2aa9a779618220b10ac0448fd6b (patch) | |
tree | 37cc76848049397c2320af0c28bbcfaa59d77290 /util.go | |
parent | Add LICENSE (diff) | |
download | meseircd-c6eacf7ef76fc2aa9a779618220b10ac0448fd6b.tar.gz meseircd-c6eacf7ef76fc2aa9a779618220b10ac0448fd6b.tar.zst meseircd-c6eacf7ef76fc2aa9a779618220b10ac0448fd6b.zip |
Slight refactor
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 +} |