I wish to output large numbers with thousand-separators (commas or spaces) — basically the same as in How to display numeric in 3 digit grouping but using printf
in C (GNU, 99).
If printf does not support digit grouping natively, how can I achieve this with something like printf("%s", group_digits(number))
?
It must support negative integers and preferably floats, too.
My own version for unsigned int64: