about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-19 01:04:52 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-19 01:04:52 +0100
commita04485f298d75ccbd8fc0b6fdd7be9ca63817cb0 (patch)
treef254ff77f3d8a497b19a1afe71efa481c7bdb3e6 /src/utils
parentb1ad3a6950c76fc38593f46eb39d65a7dc1bfcec (diff)
downloadchawan-a04485f298d75ccbd8fc0b6fdd7be9ca63817cb0.tar.gz
More work on DOM (incl. bugfixes)
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/twtstr.nim14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 91676d5a..b66c5d65 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -102,21 +102,9 @@ func toLowerAscii2*(str: string): string =
   result = newString(str.len)
   prepareMutation(result)
   copyMem(addr result[0], unsafeAddr str[0], i)
-  while i < str.len:
+  for i in i ..< str.len:
     result[i] = str[i].tolower()
 
-proc toLowerAsciiIp*(str: var string) =
-  var i = 0
-  block noconv:
-    while i < str.len:
-      let c = str[i]
-      if c in AsciiUpperAlpha:
-        break noconv
-      inc i
-    return
-  while i < str.len:
-    str[i] = str[i].tolower()
-
 func toHeaderCase*(str: string): string =
   result = str
   var flip = true