Encode()

JavaScriptEncoder::Encode(ReadOnlySpan<char16_t>, Span<char16_t>, int32_t&, int32_t&, bool) method

Escapes a UTF-16 input span into a UTF-16 destination span.

Buffers::OperationStatus System::Text::Encodings::Web::JavaScriptEncoder::Encode(ReadOnlySpan<char16_t> text, Span<char16_t> destination, int32_t &charsConsumed, int32_t &charsWritten, bool isFinalBlock)

Arguments

ParameterTypeDescription
textReadOnlySpan<char16_t>The source UTF-16 text.
destinationSpan<char16_t>The destination buffer for the escaped output.
charsConsumedint32_t&The number of source characters consumed.
charsWrittenint32_t&The number of destination characters written.
isFinalBlockboolWhether this is the final block of input.

Return Value

The operation status.

See Also