diff options
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index f1af1998..1584f3f5 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -205,6 +205,12 @@ func until*(s: string, c: set[char], starti = 0): string = break result.add(s[i]) +func untilLower*(s: string, c: set[char], starti = 0): string = + for i in starti ..< s.len: + if s[i] in c: + break + result.add(s[i].toLowerAscii()) + func until*(s: string, c: char, starti = 0): string = s.until({c}, starti) |