diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-19 01:04:52 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-19 01:04:52 +0100 |
commit | a04485f298d75ccbd8fc0b6fdd7be9ca63817cb0 (patch) | |
tree | f254ff77f3d8a497b19a1afe71efa481c7bdb3e6 /src/utils | |
parent | b1ad3a6950c76fc38593f46eb39d65a7dc1bfcec (diff) | |
download | chawan-a04485f298d75ccbd8fc0b6fdd7be9ca63817cb0.tar.gz |
More work on DOM (incl. bugfixes)
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/twtstr.nim | 14 |
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 |