Tokenize a string: Difference between revisions
Content added Content deleted
(Added Lua version) |
(→{{header|Lua}}: Changed to use in-built table.concat function) |
||
Line 971: | Line 971: | ||
local str = "Hello,How,Are,You,Today" |
local str = "Hello,How,Are,You,Today" |
||
table. |
print(table.concat(str:split(","), "."))</lang> |
||
{{out}} |
{{out}} |
||
<pre> |
<pre>Hello.How.Are.You.Today</pre> |
||
2 How |
|||
3 Are |
|||
4 You |
|||
5 Today</pre> |
|||
=={{header|K}}== |
=={{header|K}}== |