System::Text::Encodings::Web::JavaScriptEncoder::Encode method

JavaScriptEncoder::Encode 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)
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.

ReturnValue

The operation status.

See Also