The input range to encode.
The output range to store the encoded result.
The number of times the output range's put method was invoked.
import std.array : appender; auto output = appender!string(); ubyte[] data = [0x1a, 0x2b, 0x3c, 0x4d, 0x5d, 0x6e]; // This overload of encode() returns the number of calls to the output // range's put method. assert(Base64.encode(data, output) == 8); assert(output.data == "Gis8TV1u");
Encodes source into an output range using Base64 encoding.