KingTubbo
73
Q:

how to split concat string c#

var array = theString.Split(' ', 2);
1
string restOfArray = array[1];
1
string phrase = "The quick brown    fox     jumps over the lazy dog.";
string[] words = phrase.Split(' ');

foreach (var word in words)
{
    System.Console.WriteLine($"<{word}>");
}
5
string[] separatingStrings = { "<<", "..." };

string text = "one<<two......three<four";
System.Console.WriteLine($"Original text: '{text}'");

string[] words = text.Split(separatingStrings, System.StringSplitOptions.RemoveEmptyEntries);
System.Console.WriteLine($"{words.Length} substrings in text:");

foreach (var word in words)
{
    System.Console.WriteLine(word);
}
4
string[] tokens = str.Split(new[] { "is Marco and" }, StringSplitOptions.None);
0
char[] separator = new[] { ',' };
var result = aiTranslatedString.Split(separator, StringSplitOptions.RemoveEmptyEntries).ToList();
0

New to Communities?

Join the community