Commatizing numbers: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: added syntax colouring the hard way, showcommas note) |
Alextretyak (talk | contribs) (→{{header|Nim}}: fix case when `sep` has more than one character (e.g. `echo commatize("572561234.1D-4", period = 4, sep = "__")`)) |
||
Line 968: | Line 968: | ||
for i in countup(ip.high mod period + 1, ip.high, period): |
for i in countup(ip.high mod period + 1, ip.high, period): |
||
ip.insert(sep, i + inserted) |
ip.insert(sep, i + inserted) |
||
inserted += sep.len |
|||
# Process decimal part. |
# Process decimal part. |