EncodingScheme.encode
size_t encode(dchar c, ubyte[] buffer)Encodes a single code point into a user-supplied, fixed-size buffer.
This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)
The input to this function MUST be a valid code point.
Parameters
c | the code point to be encoded |
buffer | the destination array |
Returns
the number of ubytes written.