diff options
author | bptato <nincsnevem662@gmail.com> | 2024-08-11 13:59:24 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-08-11 13:59:24 +0200 |
commit | d0910f85adfec4a2cddfe2297be821841f4dd671 (patch) | |
tree | 7fac3e6c83bcb96ab8156eb22a833649ac56659c /src/utils/twtstr.nim | |
parent | 4393412d971269055401f2e8a6be766f4402e193 (diff) | |
download | chawan-d0910f85adfec4a2cddfe2297be821841f4dd671.tar.gz |
dom: fix crash on wrong image content type
+ slightly optimize getContentType
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 81384eed..c41b545f 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -158,6 +158,9 @@ func untilLower*(s: string; c: set[char]; starti = 0): string = func until*(s: string; c: char; starti = 0): string = return s.until({c}, starti) +func untilLower*(s: string; c: char; starti = 0): string = + return s.untilLower({c}, starti) + func after*(s: string; c: set[char]): string = let i = s.find(c) if i != -1: |