powered by
Functions to perform common tasks when working with base64 encoded strings.
b64_chunk(encoded, width)b64_wrap(chunks, newline)
b64_wrap(chunks, newline)
b64_chunk() returns a list of character vectors.
b64_chunk()
b64_wrap() returns a scalar character vector.
b64_wrap()
a character vector of base64 encoded strings.
a numeric scalar defining the width of the chunks. Must be divisible by 4.
a character scalar defining the newline character.
b64_chunk() splits a character vector of base64 encoded strings into chunks of a specified width.
b64_wrap() wraps a character vector of base64 encoded strings with a newline character.
encoded <- encode("Hello, world!") chunked <- b64_chunk(encoded, 4) chunked b64_wrap(chunked, "\n")
Run the code above in your browser using DataLab