parent
1d1c72dfbb
commit
a68fe3d082
2 changed files with 5 additions and 2 deletions
|
|
@ -122,6 +122,9 @@
|
||||||
- ``case object`` branch transitions via ``system.reset`` are deprecated.
|
- ``case object`` branch transitions via ``system.reset`` are deprecated.
|
||||||
Compile your code with ``-d:nimOldCaseObjects`` for a transition period.
|
Compile your code with ``-d:nimOldCaseObjects`` for a transition period.
|
||||||
|
|
||||||
|
- base64 module: The default parameter `newLine` for the `encode` procs
|
||||||
|
was changed from `"\13\10"` to the empty string `""`.
|
||||||
|
|
||||||
|
|
||||||
#### Breaking changes in the compiler
|
#### Breaking changes in the compiler
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ template encodeInternal(s: typed, lineLen: int, newLine: string): untyped =
|
||||||
#assert(r == result.len)
|
#assert(r == result.len)
|
||||||
discard
|
discard
|
||||||
|
|
||||||
proc encode*[T:SomeInteger|char](s: openarray[T], lineLen = 75, newLine="\13\10"): string =
|
proc encode*[T:SomeInteger|char](s: openarray[T], lineLen = 75, newLine=""): string =
|
||||||
## Encodes ``s`` into base64 representation. After ``lineLen`` characters, a
|
## Encodes ``s`` into base64 representation. After ``lineLen`` characters, a
|
||||||
## ``newline`` is added.
|
## ``newline`` is added.
|
||||||
##
|
##
|
||||||
|
|
@ -126,7 +126,7 @@ proc encode*[T:SomeInteger|char](s: openarray[T], lineLen = 75, newLine="\13\10"
|
||||||
assert encode([1, 2, 3, 4, 5]) == "AQIDBAU="
|
assert encode([1, 2, 3, 4, 5]) == "AQIDBAU="
|
||||||
encodeInternal(s, lineLen, newLine)
|
encodeInternal(s, lineLen, newLine)
|
||||||
|
|
||||||
proc encode*(s: string, lineLen = 75, newLine="\13\10"): string =
|
proc encode*(s: string, lineLen = 75, newLine=""): string =
|
||||||
## Encodes ``s`` into base64 representation. After ``lineLen`` characters, a
|
## Encodes ``s`` into base64 representation. After ``lineLen`` characters, a
|
||||||
## ``newline`` is added.
|
## ``newline`` is added.
|
||||||
##
|
##
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue