outBuf.utf8Encode
fn
size_t utf8Encode(dchar d, ref ubyte[4] outBuf) @safe nothrow @nogcEncode a single Unicode code point d to UTF-8 into outBuf.
Returns the number of bytes written (1..4). Intended for internal use by percent-encoding helpers.
Parameters
d | Code point to encode. |
outBuf | Output buffer that receives 1–4 UTF-8 bytes. |
Returns
The number of bytes written to