tinyprintf
tinyprintf copied to clipboard
Support commas?
I tried changing the test file to:
#include <locale.h>
...
setlocale(LC_NUMERIC, "");
TPRINTF("%'llu\n", ULLONG_MAX);
But the output is:
$ make
...
libc_printf("%'llu\n", ULLONG_MAX) -> 18,446,744,073,709,551,615
tfp_printf("%'llu\n", ULLONG_MAX) -> llu
...
The commas display for glibc as expected, but not for tfp. Any chance of adding comma support? Or at least understanding the ' character even if commas are not printed? If the locale stuff is too OTT for tinyprintf(), how about enabling comma support via an environment variable instead?
https://github.com/saintedlittle/tinyprintf