RosettaCodeData/Task/Tokenize-a-string/C-sharp/tokenize-a-string.cs
2023-07-01 13:44:08 -04:00

5 lines
233 B
C#

string str = "Hello,How,Are,You,Today";
// or Regex.Split ( "Hello,How,Are,You,Today", "," );
// (Regex is in System.Text.RegularExpressions namespace)
string[] strings = str.Split(',');
Console.WriteLine(String.Join(".", strings));