Skip to content

Support commas? #16

Description

@simonhf

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions