TextEncoder.FindFirstCharacterToEncodeUtf8(ReadOnlySpan<Byte>) Method

Definition

Finds the first element in a UTF-8 text input buffer that would be escaped by the current encoder instance.

public:
 virtual int FindFirstCharacterToEncodeUtf8(ReadOnlySpan<System::Byte> utf8Text);
public virtual int FindFirstCharacterToEncodeUtf8 (ReadOnlySpan<byte> utf8Text);
abstract member FindFirstCharacterToEncodeUtf8 : ReadOnlySpan<byte> -> int
override this.FindFirstCharacterToEncodeUtf8 : ReadOnlySpan<byte> -> int
Public Overridable Function FindFirstCharacterToEncodeUtf8 (utf8Text As ReadOnlySpan(Of Byte)) As Integer

Parameters

utf8Text
ReadOnlySpan<Byte>

The UTF-8 text input buffer to search.

Returns

The index of the first element in utf8Text that would be escaped by the current encoder instance, or -1 if no data in utf8Text requires escaping.

Applies to