Skip to content

Files

Latest commit

 

History

History
51 lines (33 loc) · 2.03 KB

Assorted.Utils.Text.StringExtensions.LazySplit.md

File metadata and controls

51 lines (33 loc) · 2.03 KB

StringExtensions.LazySplit(this string, char, StringSplitOptions) Method

Namespace: Assorted.Utils.Text
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0

Returns the substrings in this string that are delimited by a specified Unicode character.

Syntax

public static IEnumerable<string> LazySplit(
    this string source, 
    char separator, 
    StringSplitOptions options = StringSplitOptions.None
)

Parameters

source: string
The source string.

separator: char
A Unicode character that delimits the substrings in this string.

options: StringSplitOptions
System.StringSplitOptions.RemoveEmptyEntries to omit empty substrings from the result; or System.StringSplitOptions.None to include empty substring in the result.

Return Value

IEnumerable<string>
An System.Collections.Generic.IEnumerable<T> that contains the substrings.

Exceptions

Exception Description
System.ArgumentNullException source is null.

Remarks

This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action.

See Also


This document is generated by DG.