The result of doing
var b = "asfsadefbweabgggggggggggg".Split("ab".ToCharArray());
is a list of 6 strings while I want to split the array in "asfsadefbwe"
and "gggggggggggg"
. Is there any way/method to properly do that (with C#)?
PS: I'll use a string which has some data separate by "\r\n"
secuences.
string[] list = b.Split(new string[] { "ab" }, StringSplitOptions.None);
Use another overload, one that doesn't split on individual characters:
"asfsadefbweabgggggggggggg".Split(new [] {"ab" }, StringSplitOptions.None)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With