Commatizing numbers: Difference between revisions
→{{header|Factor}}: change word names, more descriptive stack effects, use existing "replace" word
(Add Factor) |
(→{{header|Factor}}: change word names, more descriptive stack effects, use existing "replace" word) |
||
Line 308:
{{works with|Factor|0.99 2020-01-23}}
<lang factor>USING: accessors grouping io kernel math regexp sequences
splitting strings unicode ;
:
R/ [1-9][0-9]*/ first-match >string ;
:
[ reverse ] [ group ] [ reverse join reverse ] tri* ;
: (commatize) ( text from period
[ cut
: commatize* ( text from period sep -- str )
|