Splitting a String by specific character
suggest changestring helloWorld = "hello world, how is it going?";
string[] parts1 = helloWorld.Split(',');
//parts1: ["hello world", " how is it going?"]
string[] parts2 = helloWorld.Split(' ');
//parts2: ["hello", "world,", "how", "is", "it", "going?"]
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents