C#:Split a String
Jump to navigation
Jump to search
Split may be used to break a single string into an array of strings.
String.Split(Char)
You can specify the character to split.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
String.Split(Char[])
You can specify the character to split.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
String.Split(Char[],SplitStringOptions)
You can indicate that empty strings are not included in the result.
Notice that the string s has several spaces between the first two words.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]