Skip to content

IJsonDocument.TextEquals Method

Definition

Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll

Overloads

Method Description
TextEquals(int, ReadOnlySpan<char>, bool) Determines whether the text at the specified index equals the specified text.
TextEquals(int, ReadOnlySpan<byte>, bool, bool) Determines whether the UTF-8 text at the specified index equals the specified text.

TextEquals(int, ReadOnlySpan<char>, bool)

Source: IJsonDocument.cs

Determines whether the text at the specified index equals the specified text.

public abstract bool TextEquals(int index, ReadOnlySpan<char> otherText, bool isPropertyName)

Parameters

Name Type Description
index int The index of the text.
otherText ReadOnlySpan<char> The text to compare.
isPropertyName bool Whether the text is a property name.

Returns

bool

true if the text equals the specified text; otherwise, false.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

TextEquals(int, ReadOnlySpan<byte>, bool, bool)

Source: IJsonDocument.cs

Determines whether the UTF-8 text at the specified index equals the specified text.

public abstract bool TextEquals(int index, ReadOnlySpan<byte> otherUtf8Text, bool isPropertyName, bool shouldUnescape)

Parameters

Name Type Description
index int The index of the text.
otherUtf8Text ReadOnlySpan<byte> The UTF-8 text to compare.
isPropertyName bool Whether the text is a property name.
shouldUnescape bool Whether the text should be unescaped.

Returns

bool

true if the text equals the specified text; otherwise, false.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue