.

Split strings on carriage return

simple way of splitting text by new lines.

string input = "one\ntwo\r\nthree\n";
string[] splitResults = input.Split(new string[] {"\n", "\r\n"}, StringSplitOptions.RemoveEmptyEntries);
foreach (string itemX in splitResults)
       Console.WriteLine(itemX);

What's your thoughts on this?

*

Protected by WP Anti Spam