mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-06 11:54:11 +00:00
@@ -122,6 +122,9 @@
|
||||
- ``case object`` branch transitions via ``system.reset`` are deprecated.
|
||||
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
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ template encodeInternal(s: typed, lineLen: int, newLine: string): untyped =
|
||||
#assert(r == result.len)
|
||||
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
|
||||
## ``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="
|
||||
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
|
||||
## ``newline`` is added.
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user