Mono Class Library: System.String Overview | Members

System.String.Split Method

Returns substrings of the current instance that are delimited by the specified characters. [Edit]

public string[] Split (params char[] separator)

Parameters

separator
A char array of delimiters. Can be a null reference. [Edit]

Returns

A string array containing the results of the split operation as follows:

Return ValueDescription
A single-element array containing the current instance.None of the elements of separator are contained in the current instance.
A multi-element string array, each element of which is a substring of the current instance that was delimited by one or more characters in separator.At least one element of separator is contained in the current instance.
A multi-element string array, each element of which is a substring of the current instance that was delimited by white space characters.The current instance contains white space characters and separator is a null reference or an empty array.
[Edit]

Remarks

string.Empty is returned for any substring where two delimiters are adjacent or a delimiter is found at the beginning or end of the current instance.

Delimiter characters are not included in the substrings.

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0