mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-30 20:28:00 +00:00
Remove unused base64.encode overload
This commit is contained in:
@@ -144,9 +144,6 @@ template encodeImpl() {.dirty.} =
|
||||
proc encode*[T: SomeInteger|char](s: openArray[T], safe = false): string =
|
||||
## Encodes `s` into base64 representation.
|
||||
##
|
||||
## This procedure encodes an openarray (array or sequence) of either integers
|
||||
## or characters.
|
||||
##
|
||||
## If `safe` is `true` then it will encode using the
|
||||
## URL-Safe and Filesystem-safe standard alphabet characters,
|
||||
## which substitutes `-` instead of `+` and `_` instead of `/`.
|
||||
@@ -154,31 +151,31 @@ proc encode*[T: SomeInteger|char](s: openArray[T], safe = false): string =
|
||||
## * https://tools.ietf.org/html/rfc4648#page-7
|
||||
##
|
||||
## **See also:**
|
||||
## * `encode proc<#encode,string>`_ for encoding a string
|
||||
## * `decode proc<#decode,string>`_ for decoding a string
|
||||
runnableExamples:
|
||||
assert encode("Hello World") == "SGVsbG8gV29ybGQ="
|
||||
assert encode(['n', 'i', 'm']) == "bmlt"
|
||||
assert encode(@['n', 'i', 'm']) == "bmlt"
|
||||
assert encode([1, 2, 3, 4, 5]) == "AQIDBAU="
|
||||
encodeImpl()
|
||||
|
||||
proc encode*(s: string, safe = false): string =
|
||||
## Encodes `s` into base64 representation.
|
||||
##
|
||||
## This procedure encodes a string.
|
||||
##
|
||||
## If `safe` is `true` then it will encode using the
|
||||
## URL-Safe and Filesystem-safe standard alphabet characters,
|
||||
## which substitutes `-` instead of `+` and `_` instead of `/`.
|
||||
## * https://en.wikipedia.org/wiki/Base64#URL_applications
|
||||
## * https://tools.ietf.org/html/rfc4648#page-7
|
||||
##
|
||||
## **See also:**
|
||||
## * `encode proc<#encode,openArray[T]>`_ for encoding an openarray
|
||||
## * `decode proc<#decode,string>`_ for decoding a string
|
||||
runnableExamples:
|
||||
assert encode("Hello World") == "SGVsbG8gV29ybGQ="
|
||||
encodeImpl()
|
||||
# proc encode*(s: string, safe = false): string =
|
||||
# ## Encodes `s` into base64 representation.
|
||||
# ##
|
||||
# ## This procedure encodes a string.
|
||||
# ##
|
||||
# ## If `safe` is `true` then it will encode using the
|
||||
# ## URL-Safe and Filesystem-safe standard alphabet characters,
|
||||
# ## which substitutes `-` instead of `+` and `_` instead of `/`.
|
||||
# ## * https://en.wikipedia.org/wiki/Base64#URL_applications
|
||||
# ## * https://tools.ietf.org/html/rfc4648#page-7
|
||||
# ##
|
||||
# ## **See also:**
|
||||
# ## * `encode proc<#encode,openArray[T]>`_ for encoding an openarray
|
||||
# ## * `decode proc<#decode,string>`_ for decoding a string
|
||||
# runnableExamples:
|
||||
# assert encode("Hello World") == "SGVsbG8gV29ybGQ="
|
||||
# encodeImpl()
|
||||
|
||||
proc encodeMime*(s: string, lineLen = 75, newLine = "\r\n"): string =
|
||||
## Encodes `s` into base64 representation as lines.
|
||||
|
||||
Reference in New Issue
Block a user