diff options
author | bptato <nincsnevem662@gmail.com> | 2024-07-29 20:34:14 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-07-29 23:24:34 +0200 |
commit | bfff8f7cee0c65c2f76164c8e75bbd267bc07cd0 (patch) | |
tree | 35b63c66974862d41d69743246ed121a78797b7e /src/utils/twtstr.nim | |
parent | 83d119903270acc85110c291fe0b7a4d967a9052 (diff) | |
download | chawan-bfff8f7cee0c65c2f76164c8e75bbd267bc07cd0.tar.gz |
twtstr: fix startsWithIgnoreCase
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 44c6ea3f..7cadd41f 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -108,9 +108,9 @@ func toHexLower*(u: uint16): string = func equalsIgnoreCase*(s1, s2: string): bool {.inline.} = return s1.cmpIgnoreCase(s2) == 0 -func startsWithIgnoreCase*(s1, s2: string; si = 0): bool = +func startsWithIgnoreCase*(s1, s2: openArray[char]): bool = if s1.len < s2.len: return false - for i in si ..< s2.len: + for i in 0 ..< s2.len: if s1[i].toLowerAscii() != s2[i].toLowerAscii(): return false return true |