Given a string and we have to split the string in multiple strings by separating it by the given delimiter.
String.Split()
String.Split() Method returns array of strings, and we pass separator (delimiter) in character format to split string. Separators may be ',' , ':' , '$' etc.
Syntax:
String[] String.Split(char ch);
Example:
Input string: Hello,friends,how,are,you?
If we separate string from comma (,) (it is also known as delimiter),
result is given below...
Output:
Hello
friends
how
are
you?
Consider the program:
Output