System::Text::Encodings::Web::JavaScriptEncoder::FindFirstCharacterToEncodeUtf8 method

JavaScriptEncoder::FindFirstCharacterToEncodeUtf8 method

Finds the index of the first UTF-8 byte that needs to be escaped.

int32_t System::Text::Encodings::Web::JavaScriptEncoder::FindFirstCharacterToEncodeUtf8(ReadOnlySpan<uint8_t> utf8Text) const
ParameterTypeDescription
utf8TextReadOnlySpan<uint8_t>The UTF-8 text to scan.

ReturnValue

Index of the first byte requiring escaping, or -1 if none.

See Also