diff options
author | bptato <nincsnevem662@gmail.com> | 2023-09-30 18:02:48 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-09-30 19:02:05 +0200 |
commit | 31fbd611aa107cc023dcf1e1358f19ff58f14075 (patch) | |
tree | c3360c2f4575a249bb30f18b746ab3a0ce0c91b2 /src/utils | |
parent | bb2c7cb87a99f790b6c741f85de666dd7aeae10c (diff) | |
download | chawan-31fbd611aa107cc023dcf1e1358f19ff58f14075.tar.gz |
Add urimethodmap support
yay
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/twtstr.nim | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index ca79fa76..d8ce9ae8 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -206,13 +206,11 @@ func skipBlanks*(buf: string, at: int): int = while result < buf.len and buf[result].isWhitespace(): inc result -func until*(s: string, c: set[char]): string = - var i = 0 - while i < s.len: +func until*(s: string, c: set[char], starti = 0): string = + for i in starti ..< s.len: if s[i] in c: break result.add(s[i]) - inc i func until*(s: string, c: char): string = s.until({c}) |