encode

encodes data and returns as an ASCII hex string.

  1. char[] encode(const(ubyte[]) data, char[] buff)
  2. char[] encode(const(ubyte[]) data)
    char[]
    encode
    (
    const(ubyte[]) data
    )

Parameters

data const(ubyte[])

what is to be encoded

Examples

char[] myEncodedString = encode(cast(ubyte[])"Hello, how are you today?");
Stdout(myEncodedString).newline; // 48656C6C6F2C20686F772061726520796F7520746F6461793F

Meta