diff options
author | bptato <nincsnevem662@gmail.com> | 2023-08-10 19:01:12 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-08-10 19:01:12 +0200 |
commit | c5f6051f216a8a9f192d90da8a800c3e1330b143 (patch) | |
tree | ea05483cd41d1bbd5a1ac04bd80ca012eea71d51 /src/utils/twtstr.nim | |
parent | 84a93e4ab3cee94f15c96fff3f7841813c618d8a (diff) | |
download | chawan-c5f6051f216a8a9f192d90da8a800c3e1330b143.tar.gz |
css: implement case insensitivity
For some reason I forgot about this.
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 1c2c2a1d..6f6c469d 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -197,14 +197,6 @@ func toHexLower*(u: uint16): string = func pushHex*(buf: var string, i: uint8) = buf.pushHex(cast[char](i)) -func equalsIgnoreCase*(s1: seq[Rune], s2: string): bool = - var i = 0 - while i < min(s1.len, s2.len): - if not s1[i].isAscii() or cast[char](s1[i]).tolower() != s2[i]: - return false - inc i - return true - func equalsIgnoreCase*(s1, s2: string): bool {.inline.} = return s1.cmpIgnoreCase(s2) == 0 |