EncodingScheme.encode

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.

class EncodingScheme
const abstract
size_t
encode
(
dchar c
,
ubyte[] buffer
)

Parameters

c dchar

the code point to be encoded

buffer ubyte[]

the destination array

Return Value

Type: size_t

the number of ubytes written.

Meta