Timeline for Format an integer with thousands separator (recursive implementation)
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 18, 2017 at 18:00 | comment | added | Incomputable | @TobySpeight, thanks, will check that out. Probably kubuntu 16.04 supports it. | |
Oct 18, 2017 at 17:47 | comment | added | Toby Speight |
If your platform supports it, you can explore grouping rules in shell: tryLC_NUMERIC=en_IN printf "%'d\n" 5000000 , for example. This gives 50,00,000 as output.
|
|
Oct 18, 2017 at 17:37 | history | edited | Incomputable | CC BY-SA 3.0 |
deleted 148 characters in body
|
Oct 18, 2017 at 17:32 | comment | added | Incomputable | @LokiAstari, thanks for the links, will probably post a question after I'll deal with midterms tomorrow. | |
Oct 18, 2017 at 17:29 | comment | added | Loki Astari | For simple examples on how to use facets see this question: codereview.stackexchange.com/a/71246/507 read to the bottom for links to lots of example usages. | |
Oct 18, 2017 at 17:28 | comment | added | Loki Astari | Also its not that many lines of code: stackoverflow.com/a/3479520/14065 | |
Oct 18, 2017 at 17:24 | comment | added | Loki Astari |
Maybe to do magical things you need to be skilled. But to simply turn it on requires one command: std::cout.imbue(std::locale("")); Prefer not to use the specific local "de_DE" . If you use the local "" it picks up the local specified on the host machine (in this modern day this is usually set correctly) and provides the correct output for human readability. If you want to generate transportable text output you should use the "C" local.
|
|
Oct 18, 2017 at 16:12 | history | answered | Incomputable | CC BY-SA 3.0 |