Tokenize a string: Difference between revisions
Content deleted Content added
→{{header|Ada}}: More proper use of 'Range and 'First |
m →{{header|C sharp|C#}}: Add missing bracket in comment. |
||
Line 317: | Line 317: | ||
<lang csharp>string str = "Hello,How,Are,You,Today"; |
<lang csharp>string str = "Hello,How,Are,You,Today"; |
||
// or Regex.Split ( "Hello,How,Are,You,Today", "," ); |
// or Regex.Split ( "Hello,How,Are,You,Today", "," ); |
||
// (Regex is in System.Text.RegularExpressions namespace |
// (Regex is in System.Text.RegularExpressions namespace) |
||
string[] strings = str.Split(','); |
string[] strings = str.Split(','); |
||
foreach (string s in strings) |
foreach (string s in strings) |