Base32Impl.encode

Encodes source and stores the result in buffer. If no _buffer is assigned, a new buffer will be created.

  1. char[] encode(in UB[] source, C[] buffer = null)
  2. char[] encode(UBR source, C[] buffer = null)
    template Base32Impl(UseHex useHex = UseHex.no, UsePad usePad = UsePad.yes)
    char[]
    encode
    (
    UBR
    C = char
    )
    (
    UBR source
    ,
    C[] buffer = null
    )
    if (
    !isArray!UBR &&
    isInputRange!UBR
    &&
    is(ElementType!UBR : ubyte)
    &&
    hasLength!UBR
    &&
    is(C == char)
    )
    in { assert (!buffer.ptr || buffer.length >= encodeLength(source.length), "Insufficient buffer for encoding"); }
    out (result) {}
  3. size_t encode(in UB[] source, CR range)
  4. size_t encode(UBR source, CR range)

Parameters

source
Type: UBR

An InputRange to encode.

buffer
Type: C[]

An array to store the encoded result.

Return Value

Type: char[]

The slice of buffer containing the result.

Meta