Tokenize a string: Difference between revisions
Content added Content deleted
(Added Wren) |
|||
Line 3,114: | Line 3,114: | ||
=={{header|Vala}}== |
=={{header|Vala}}== |
||
<lang |
<lang Vala>void main() { |
||
string s = "Hello,How,Are,You,Today"; |
string s = "Hello,How,Are,You,Today"; |
||
print(@"$(string.joinv(".", s.split(",")))"); |
|||
// create array of strings, could use var words instead if desired |
|||
} |
|||
string[] words = s.split(","); |
|||
{{out}} |
|||
// create string by joining array of strings with . |
|||
<pre>Hello.How.Are.You.Today</pre> |
|||
string joined = string.joinv(".", words);</lang> |
|||
=={{header|VBA}}== |
=={{header|VBA}}== |