From c6eacf7ef76fc2aa9a779618220b10ac0448fd6b Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Dec 2024 08:42:11 +0800 Subject: Slight refactor --- util.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'util.go') 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 +} -- cgit v1.2.3