System::Text::Unicode::Utf8::FromUtf16 method

Utf8::FromUtf16 method

Converts a span of UTF-16 characters into a span of UTF-8 bytes.

static Buffers::OperationStatus System::Text::Unicode::Utf8::FromUtf16(ReadOnlySpan<char16_t> source, Span<uint8_t> destination, int32_t &charsRead, int32_t &bytesWritten, bool replaceInvalidSequences, bool isFinalBlock)
ParameterTypeDescription
sourceReadOnlySpan<char16_t>The UTF-16 source characters.
destinationSpan<uint8_t>The destination buffer for the UTF-8 bytes.
charsReadint32_t&The number of source characters consumed.
bytesWrittenint32_t&The number of destination bytes written.
replaceInvalidSequencesboolWhether to replace invalid sequences with the replacement character.
isFinalBlockboolWhether this is the final block of input.

ReturnValue

The operation status.

See Also