Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom thousand separator #3840

Closed
razaqq opened this issue Feb 5, 2024 · 1 comment
Closed

Custom thousand separator #3840

razaqq opened this issue Feb 5, 2024 · 1 comment
Labels

Comments

@razaqq
Copy link
Contributor

razaqq commented Feb 5, 2024

Lets say you have the number 1343213 and would like it formatted as 1 343 213 or 1#343#213 or any other thousands separator, how is that possible? I have tried setting #define FMT_STATIC_THOUSANDS_SEPARATOR ' ' but that didnt work. Thanks

@vitaut
Copy link
Contributor

vitaut commented Feb 5, 2024

You can do it with locale: https://en.cppreference.com/w/cpp/locale/numpunct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants