aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/twtstr.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 93fce06f..c41a7e57 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -130,6 +130,9 @@ func normalizeLocale*(s: string): string =
func isAscii*(r: Rune): bool =
return cast[uint32](r) < 128
+func `==`*(r: Rune, c: char): bool {.inline.} =
+ return Rune(c) == r
+
func startsWithNoCase*(str, prefix: string): bool =
if str.len < prefix.len: return false
# prefix.len is always lower