generate
Generates one or two UTF-16 characters to represent the given UCS-4 character.
Return
Either a positive count of the number of UTF-16 characters written to the destination buffer, or -1, in which case error() will return a descriptive result object
Parameters
The UCS-4 character
The number of input bytes from which the UCS-4 value was constructed (used when creating result objects)
The destination buffer, to which one or two UTF-16 characters will be written
Generates one or two UTF-16 characters to represent the given UCS-4 character.
Return
Either a positive count of the number of UTF-16 characters written to the destination buffer, or -1, in which case error() will return a descriptive result object
Parameters
The UCS-4 character
The number of input bytes from which the UCS-4 value was constructed (used when creating result objects)
The destination array, to which one or two UTF-16 characters will be written
The destination position
The destination limit