diff options
author | bptato <nincsnevem662@gmail.com> | 2024-10-01 21:40:26 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-10-01 21:41:55 +0200 |
commit | 6e6d9e2ab875ffdb9dcaf1a2ed689a1390f72848 (patch) | |
tree | 54a5ff65513d6595341930d1638ecfc54df86c11 /src/utils/twtstr.nim | |
parent | ef1a514a4d5a338831bf8828bb6f0e2f8addda2a (diff) | |
download | chawan-6e6d9e2ab875ffdb9dcaf1a2ed689a1390f72848.tar.gz |
twtstr: misc refactorings
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 46787553..a83dfeef 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -353,8 +353,8 @@ func percentEncode*(s: openArray[char]; set: set[char]; spaceAsPlus = false): result = "" result.percentEncode(s, set, spaceAsPlus) -func percentDecode*(input: openArray[char]; si = 0): string = - var i = si +func percentDecode*(input: openArray[char]): string = + var i = 0 while i < input.len: let c = input[i] if c != '%' or i + 2 >= input.len: @@ -627,7 +627,7 @@ func atob(c: char): uint8 {.inline.} = return 63 return uint8.high -func atob0*(data: string): Result[string, string] = +func atob0*(data: string): Result[string, cstring] = var outs = newStringOfCap(data.len div 4 * 3) var buf: array[4, uint8] var i = 0 |