diff options
author | siddharth <s@ricketyspace.net> | 2021-06-06 15:29:19 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2021-06-06 15:29:19 -0400 |
commit | 4af3ded113719f61b7249a33358af01568098c5c (patch) | |
tree | 4356179ad89e4e195a258187a70df5425bfeb52c /lib | |
parent | 3e5b67b5f6e8bc703f4497f37611e1058a5d3c78 (diff) |
lib: add `ByteIsUpper`
Diffstat (limited to 'lib')
-rw-r--r-- | lib/byte.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/byte.go b/lib/byte.go index a29a7b0..68d07bf 100644 --- a/lib/byte.go +++ b/lib/byte.go @@ -32,3 +32,10 @@ func BytesInCommon(bbytes [][]byte) []byte { } return common } + +func ByteIsUpper(b byte) bool { + if 'A' <= b && b <= 'Z' { + return true + } + return false +} |