NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

String.Split

Creates an array of strings by splitting this string.

Overload List

Creates an array of strings by splitting this string with a specified separator.

[Visual Basic] Overloads Public Function Split(Char()) As String ()
[C#] public string[] Split(char[]);
[C++] public: String* Split(__wchar_t*[]) [];
[JScript] public function Split(Char[]) : String[];

Creates an array of strings by splitting this string with a specified arrays as the separator.

[Visual Basic] Overloads Public Function Split(Char(), Integer) As String ()
[C#] public string[] Split(char[], int);
[C++] public: String* Split(__wchar_t*[], int) [];
[JScript] public function Split(Char[], int) : String[];

Example

Note   This example shows how to use one of the overloaded versions of Split. For other examples that may be available, see the individual overload topics.
"42,
12, 19".Split ({',', ' '}, 2) => {"42", "12, 19"}
"42..12..19".Split({'.'},
4) => {"42", "", "12", ".19"} 
"Banana".Split({'.'},
2) => {"Banana"} 
"Darb
Smarba".Split({}, 1) => {"Darb Smarba"} 
"Darb
Smarba".Split(null,2) => {"Darb", "Smarba"} 
"Darb
Smarba".Split(null,100) => {"Darb", "Smarba"} 
Throws
ArgumentException if count is < 0.

See Also

String Class | String Members | System Namespace