Skip to content

Regex.EnumerateSplitsUnchecked Method

Definition

Namespace: Corvus.Ecma262.RegularExpressions
Assembly: Corvus.Regex.Ecma262.dll

Overloads

Method Description
EnumerateSplitsUnchecked(ReadOnlySpan<byte>) Enumerates the pieces a UTF-8 text splits into at the matches, as positions, allocating nothing (see EnumerateSplits).
EnumerateSplitsUnchecked(ReadOnlySpan<byte>, int) Enumerates the pieces a UTF-8 text splits into at the matches, up to a number of pieces, allocating nothing.

EnumerateSplitsUnchecked(ReadOnlySpan<byte>)

Source: Regex.Spans.cs

Enumerates the pieces a UTF-8 text splits into at the matches, as positions, allocating nothing (see EnumerateSplits).

public Utf8ValueSplitEnumerator EnumerateSplitsUnchecked(ReadOnlySpan<byte> utf8)

Parameters

Name Type Description
utf8 ReadOnlySpan<byte> The text.

Returns

Utf8ValueSplitEnumerator

The enumerator.

Remarks

The text is not checked to be UTF-8: this is for text its caller knows to be UTF-8, such as the strings of parsed JSON, or a text checked once and matched many times. Bytes that are not UTF-8 are read as U+FFFD one at a time; the member without Unchecked refuses them.

Applies To

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

EnumerateSplitsUnchecked(ReadOnlySpan<byte>, int)

Source: Regex.Spans.cs

Enumerates the pieces a UTF-8 text splits into at the matches, up to a number of pieces, allocating nothing.

public Utf8ValueSplitEnumerator EnumerateSplitsUnchecked(ReadOnlySpan<byte> utf8, int count)

Parameters

Name Type Description
utf8 ReadOnlySpan<byte> The text.
count int The most pieces to give. 0 gives none.

Returns

Utf8ValueSplitEnumerator

The enumerator.

Remarks

The text is not checked to be UTF-8: this is for text its caller knows to be UTF-8, such as the strings of parsed JSON, or a text checked once and matched many times. Bytes that are not UTF-8 are read as U+FFFD one at a time; the member without Unchecked refuses them.

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