I would like to split a string into a String[] using a String as a delimiter.
String delimit = "[break]";
String[] tokens = myString.Split(delimit);
But the method above only works with a char as a delimiter.
Any takers?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Like this:
For some reason, the only overloads of
Splitthat take a string take it as an array, along with aStringSplitOptions.I have no idea why there isn’t a
string.Split(params string[])overload.