TryEncodeToUtf8()

Rune::TryEncodeToUtf8(Span<uint8_t>, int32_t&) method

Encodes this Rune to a UTF-8 destination buffer.

bool System::Text::Rune::TryEncodeToUtf8(Span<uint8_t> destination, int32_t &bytesWritten)

Arguments

ParameterTypeDescription
destinationSpan<uint8_t>The buffer to which to write this value as UTF-8.
bytesWrittenint32_t&The number of bytes written to the destination buffer, or 0 if the buffer is too small.

Return Value

true if the value was written to the buffer; otherwise, false.

See Also