From d0910f85adfec4a2cddfe2297be821841f4dd671 Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 11 Aug 2024 13:59:24 +0200 Subject: dom: fix crash on wrong image content type + slightly optimize getContentType --- src/utils/twtstr.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/utils/twtstr.nim') 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: -- cgit 1.4.1-2-gfad0