StringSegmentSplit(Char, StringSegmentSplitOptions) Method

Splits this StringSegment instance into a collection of StringSegment instances without allocating new strings. Alternatively, you can use the ReadToSeparator(StringSegment, Char) 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: 10.0.0
C#
public IList<StringSegment> Split(
	char separator,
	StringSegmentSplitOptions options
)

Parameters

separator  Char
A character that delimits the segments in this StringSegment.
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