Commatizing numbers: Difference between revisions
Content added Content deleted
(→{{header|jq}}: tweak) |
|||
Line 1,024: | Line 1,024: | ||
# Input: the string to be commatized |
# Input: the string to be commatized |
||
def |
def commatize: |
||
commatize(.; 0; 3; ","); |
commatize(.; 0; 3; ","); |
||
Line 1,046: | Line 1,046: | ||
commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion)."; 0; 3; "."), |
commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion)."; 0; 3; "."), |
||
(defaults[] | |
(defaults[] | commatize) ; |
||
exercise |
exercise |
||
Line 1,052: | Line 1,052: | ||
{{output}} |
{{output}} |
||
Exactly as for [[#Wren[]]. |
Exactly as for [[#Wren[]]. |
||
=={{header|Julia}}== |
=={{header|Julia}}== |