Commatizing numbers: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(2 intermediate revisions by one other user not shown)
Line 1,024:
 
# Input: the string to be commatized
def commatize2commatize:
commatize(.; 0; 3; ",");
 
Line 1,046:
commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion)."; 0; 3; "."),
 
(defaults[] | commatize2commatize) ;
 
exercise
</syntaxhighlight>
{{output}}
Exactly as for [[#Wren[|Wren]].
 
 
=={{header|Julia}}==
Line 1,902 ⟶ 1,901:
 
=={{header|Wren}}==
<syntaxhighlight lang="ecmascriptwren">var commatize = Fn.new { |s, start, step, sep|
var addSeps = Fn.new { |n, dp|
var lz = ""
9,476

edits