Comments (3)
Hello @cup, thank you for opening an issue. Unfortunately, i don't know what to do with your comment.
Do you wish to have grouping support in pprintpp
, too? If so, please understand that pprintpp
is only a frontend for whatever printf
implementation you use. That means, that if your printf
implementation has no grouping support, then pprintpp
will not be able to change that as it is not designed to do that.
Or do you have a printf
implementation that supports grouping, but it does not work well in combination with pprintpp
? If yes, and you wish for assistance fixing that, then i can help you best if you provide the exact format schema that pprintpp
would need to generate from given inputs.
from pprintpp.
@tfc for the purpose of this issue, lets assume that all printf
have grouping support. Now thats settled, how to do grouping with pprintpp
?
from pprintpp.
Hey @cup,
i just looked up how grouping in POSIX printf works:
#include <locale.h>
#include <stdio.h>
int main() {
setlocale(LC_ALL, ""); /* use user selected locale */
printf("%'d", 1000000);
}
with pprintpp it works out of the box:
#include <pprintpp.hpp>
#include <clocale>
#include <cstdio>
int main() {
setlocale(LC_ALL, ""); /* use user selected locale */
pprintf("{'}", 1000000);
}
In both cases, the output is 1,000,000
.
from pprintpp.
Related Issues (15)
- reorder printf paramters HOT 1
- How to integrate with user defined types HOT 12
- C++11 Lambda expression instead of local class/struct in AUTOFORMAT HOT 2
- Thank you! HOT 2
- Does {s} work with std::string_view? HOT 1
- pprintpp needs extra cstdio include
- Mixing format syles causes wrong output HOT 1
- Add support for string view? HOT 3
- Explicit hexadecimal format with signed argument HOT 1
- Explicit length identifier broken HOT 2
- AVOID_STL requires STL includes HOT 1
- Header soup HOT 3
- tie_types ... no implementation ? HOT 1
- https://github.com/dbj-systems/pprintpp_msvc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pprintpp.