diff options
author | bptato <nincsnevem662@gmail.com> | 2023-09-15 18:50:24 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-09-15 18:50:24 +0200 |
commit | 38cca168130a1376e3a891d7215e0472f008d50a (patch) | |
tree | 102cb4d7df5bcfec3122c38beddfd3f1d629eee6 /src/utils/twtstr.nim | |
parent | 73c9788a7bd64a7f74d9e40b8ab5963817dad59e (diff) | |
download | chawan-38cca168130a1376e3a891d7215e0472f008d50a.tar.gz |
data urls: percent decode
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 257bdc66..f146b445 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -535,8 +535,8 @@ func percentEncode*(c: char, set: set[char], spaceAsPlus = false): string {.inli func percentEncode*(s: string, set: set[char], spaceAsPlus = false): string = result.percentEncode(s, set, spaceAsPlus) -func percentDecode*(input: string): string = - var i = 0 +func percentDecode*(input: string, si = 0): string = + var i = si while i < input.len: let c = input[i] if c != '%' or i + 2 >= input.len: |