aboutsummaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-08 08:42:11 +0800
committerRunxi Yu <me@runxiyu.org>2024-12-08 08:44:04 +0800
commitc6eacf7ef76fc2aa9a779618220b10ac0448fd6b (patch)
tree37cc76848049397c2320af0c28bbcfaa59d77290 /util.go
parentAdd LICENSE (diff)
downloadmeseircd-c6eacf7ef76fc2aa9a779618220b10ac0448fd6b.tar.gz
meseircd-c6eacf7ef76fc2aa9a779618220b10ac0448fd6b.tar.zst
meseircd-c6eacf7ef76fc2aa9a779618220b10ac0448fd6b.zip
Slight refactor
Diffstat (limited to 'util.go')
-rw-r--r--util.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.go b/util.go
index 0037330..8754348 100644
--- a/util.go
+++ b/util.go
@@ -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
+}