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
Thousands separator problem #529
Comments
Both issues are addressed in the new experimental version of the library. This version is located in the The first issue is solved by using C++ locales that support wide thousands separator character. Thousands separator can be customized by passing a custom locale via a buffer. |
Can that fatures arrive in the release? |
Yes, these features/fixes will be a part of the next major release (since replacing C with C++ locales is a breaking change). |
Fixed in the |
Is there a way to limit the width for thousand separated fields? fmt::format("{:<5n}", 12345678) // want 12,34 but get 12,345,678 |
Yes, use |
good to know, but I frequently use fmt for fixed with tables like below. Can I control the padding (not necessarily overflow) for the 2nd item? fmt::format("{:<50.50}{:<12.12}{<:12.12}\n", "ITEM", "COST","RATING") // header |
You can control the minimum width but not the maximum width. The latter can be controlled via a nested call to |
I found some problems using library in farmanager project for {i:n} format.
[Bug]
Thousands separator is always char in library. It caused problem when separator is unicode character wider than 1 byte. It is very possible in windows case.
[Feature request]
For now there is no way to customize separator manually.
In farmanager thousands separator is configurable [optional].
Is it possible to pass that custom value to library?
There is link to discussion on farmanager bugtracker: http://bugs.farmanager.com/view.php?id=3382
The text was updated successfully, but these errors were encountered: