StringSegmentSplit(String, StringSegmentSplitOptions) Method

Splits this StringSegment instance into a collection of StringSegment instances without allocating new strings. Alternatively, you can use the ReadToSeparator(StringSegment, String) extension method.
See the Remarks section of the StringSegment type for details and some examples.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
public IList<StringSegment> Split(
	string? separator,
	StringSegmentSplitOptions options
)

Parameters

separator  String
A string that delimits the segments in this StringSegment. If or empty, then no splitting will occur.
options  StringSegmentSplitOptions
A StringSegmentSplitOptions value that specifies whether to trim segments and remove empty entries.

Return Value

IListStringSegment
A list of StringSegment instances, whose elements contain the substrings in this StringSegment that are delimited by separator.

See Also