Skip to content

Regex.EnumerateSplits Method

Definition

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

Overloads

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

EnumerateSplits(ReadOnlySpan<char>)

Source: Regex.Spans.cs

Enumerates the pieces a UTF-16 text splits into at the matches, as positions, allocating nothing. The pieces are those of Split without the captures of the matches, which it puts between them.

public ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input)

Parameters

Name Type Description
input ReadOnlySpan<char> The text.

Returns

ValueSplitEnumerator

The enumerator.

Applies To

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

EnumerateSplits(ReadOnlySpan<char>, int)

Source: Regex.Spans.cs

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

public ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, int count)

Parameters

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

Returns

ValueSplitEnumerator

The enumerator.

Applies To

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

EnumerateSplits(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 EnumerateSplits(ReadOnlySpan<byte> utf8)

Parameters

Name Type Description
utf8 ReadOnlySpan<byte> The text.

Returns

Utf8ValueSplitEnumerator

The enumerator.

Applies To

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

EnumerateSplits(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 EnumerateSplits(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.

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