tinyprintf icon indicating copy to clipboard operation
tinyprintf copied to clipboard

Support commas?

Open simonhf opened this issue 4 years ago • 0 comments

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?

simonhf avatar Feb 15 '20 19:02 simonhf