Anonymous user
Tokenize a string: Difference between revisions
→{{header|Prolog}}: Add example using SWI Prolog string preds
(Added LFE example) |
(→{{header|Prolog}}: Add example using SWI Prolog string preds) |
||
Line 1,560:
Hello.How.Are.You.Today
</pre>
{{workds with|SWI Prolog 7}}
Using the SWI Prolog string data type and accompanying predicates,
this can be accomplished in a few lines in the top level:
?- split_string("Hello,How,Are,You,Today", ",", "", Split),
| atomics_to_string(Split, ".", PeriodSeparated),
| writeln(PeriodSeparated).
Hello.How.Are.You.Today
=={{header|Python}}==
|