Tokenize a string: Difference between revisions
Content added Content deleted
(Added Fennel.) |
|||
Line 2,810: | Line 2,810: | ||
echo implode('.', explode(',', $str)); |
echo implode('.', explode(',', $str)); |
||
?></lang> |
?></lang> |
||
=={{header|Picat}}== |
|||
Using the built-in functions split/2 and join/2. |
|||
<lang Picat>import util. |
|||
% using built-in split/2 and join/2 |
|||
go => |
|||
S = "Hello,How,Are,You,Today", |
|||
T = S.split(","), |
|||
println(T), |
|||
T.join(".").println(), |
|||
% As a one liner: |
|||
S.split(",").join(".").println().</lang> |
|||
{{out}} |
|||
<pre>[Hello,How,Are,You,Today] |
|||
Hello.How.Are.You.Today |
|||
Hello.How.Are.You.Today</pre> |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |