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.decode - multiple declarations

Function Base64Impl.decode

Decodes source into buffer.

Prototypes

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

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

Parameters

NameDescription
source an InputRange to decode.
buffer a buffer to store decoded result.

Returns

the decoded string that slices buffer.

Throws

an Exception if source has character outside base-alphabet.

Function Base64Impl.decode

Decodes source into range.

Prototypes

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

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

Parameters

NameDescription
source an InputRange to decode.
range an OutputRange to put decoded result

Returns

the number of calling put.

Throws

an Exception if source has character outside base-alphabet.

Function Base64Impl.decode

Decodes source into new buffer.

Shortcut to decode(source, buffer) function.

Prototypes

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

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

Authors

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

License

Boost License 1.0.

Comments