From 2d9992587c8914050ba1f1f71345836c116ea14a Mon Sep 17 00:00:00 2001
From: rsiddharth <s@ricketyspace.net>
Date: Sat, 5 Sep 2020 19:05:50 -0400
Subject: lib: add isAlpha

* lib/str.go (isAlpha): New function.
---
 lib/str.go | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/str.go b/lib/str.go
index 84f80ab..7129136 100644
--- a/lib/str.go
+++ b/lib/str.go
@@ -28,3 +28,13 @@ func stripSpaceChars(s string) string {
 	}
 	return ss
 }
+
+func isAlpha(c byte) bool {
+	switch {
+	case 'A' <= c && c <= 'Z':
+		return true
+	case 'a' <= c && c <= 'z':
+		return true
+	}
+	return false
+}
-- 
cgit v1.2.3