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