Tokenize a string: Difference between revisions

(→‎{{header|Prolog}}: Add example using SWI Prolog string preds)
Line 1,561:
</pre>
 
{{workdsworks 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:
 
<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}}==