This commit is contained in:
parent
a7aeabb9d2
commit
0944b0f441
11 changed files with 109 additions and 109 deletions
|
|
@ -112,7 +112,7 @@ template encodeInternal(s: typed): untyped =
|
|||
|
||||
result.setLen(outputIndex)
|
||||
|
||||
proc encode*[T: SomeInteger|char](s: openarray[T]): string =
|
||||
proc encode*[T: SomeInteger|char](s: openArray[T]): string =
|
||||
## Encodes `s` into base64 representation.
|
||||
##
|
||||
## This procedure encodes an openarray (array or sequence) of either integers
|
||||
|
|
@ -186,7 +186,7 @@ proc decode*(s: string): string =
|
|||
return (size * 3 div 4) + 6
|
||||
|
||||
template inputChar(x: untyped) =
|
||||
let x = int decode_table[ord(s[inputIndex])]
|
||||
let x = int decodeTable[ord(s[inputIndex])]
|
||||
inc inputIndex
|
||||
if x == invalidChar:
|
||||
raise newException(ValueError,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue