View source code Display the source code in std/base64.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

std.base64.base64_impl.encode - multiple declarations

Function Base64Impl.encode

Encodes source into buffer.

Prototypes

char[] encode(R1, R2)(
  R1 source,
  R2 buffer
) pure @trusted
if (isArray!R1 && is(ElementType!R1 : ubyte) && is(R2 == char[]));

char[] encode(R1, R2)(
  R1 source,
  R2 buffer
)
if (!isArray!R1 && isInputRange!R1 && is(ElementType!R1 : ubyte) && hasLength!R1 && is(R2 == char[]));

Parameters

NameDescription
source an InputRange to encode.
buffer a buffer to store encoded result.

Returns

the encoded string that slices buffer.

Function Base64Impl.encode

Encodes source into range.

Prototypes

size_t encode(R1, R2)(
  R1 source,
  R2 range
)
if (isArray!R1 && is(ElementType!R1 : ubyte) && !is(R2 == char[]));

size_t encode(R1, R2)(
  R1 source,
  R2 range
)
if (!isArray!R1 && isInputRange!R1 && is(ElementType!R1 : ubyte) && hasLength!R1 && !is(R2 == char[]) && isOutputRange!(R2, char));

Parameters

NameDescription
source an InputRange to encode.
range an OutputRange to put encoded result.

Returns

the number of calling put.

Function Base64Impl.encode

Encodes source to new buffer.

Shortcut to encode(source, buffer) function.

Prototypes

char[] encode(Range)(
  Range source
) pure @safe
if (isArray!Range && is(ElementType!Range : ubyte));

char[] encode(Range)(
  Range source
)
if (!isArray!Range && isInputRange!Range && is(ElementType!Range : ubyte) && hasLength!Range);

Authors

Masahiro Nakagawa, Daniel Murphy (Single value Encoder and Decoder)

License

Boost License 1.0.

Comments