Answers for "split C sharp"


c sharp split string

// To split a string use 'Split()', you can choose where to split
string text = "Hello World!"
string[] textSplit = text.Split(" ");
// Output:
// ["Hello", "World!"]
Posted by: Guest on February-22-2020

String Split C-Sharp

string s = "You win some. You lose some.";

string[] subs = s.Split(' ');

foreach (var sub in subs)
    Console.WriteLine($"Substring: {sub}");

// This example produces the following output:
// Substring: You
// Substring: win
// Substring: some.
// Substring: You
// Substring: lose
// Substring: some.
Posted by: Guest on August-24-2021

split string in c#

string phrase = "The quick brown    fox     jumps over the lazy dog.";
string[] words = phrase.Split(' ');

foreach (var word in words)
Posted by: Guest on March-24-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language