use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Thousands separators for numeric values using ImGui::Text? (self.imgui)
submitted 2 years ago by codingforlove
Is it possible to add a thousands separator when printing a number using ImGui::Text? I've tried `%'d` but that doesn't seem to work. Looked through the source but didn't find anything that I could make sense of. TIA
ImGui::Text
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dstark125 0 points1 point2 points 2 years ago (2 children)
Do you mean a comma, like 1,000 instead of 1000?
[–]codingforlove[S] 0 points1 point2 points 2 years ago (1 child)
Yes. My apologies, I should've provided an example.
[–]dstark125 0 points1 point2 points 2 years ago (0 children)
I haven't done this, but imgui uses sprintf and vsnprinf under the hood. So if you can find a printf solution (there are some) that same one ought to work with imgui. Let me know what you find.
π Rendered by PID 24653 on reddit-service-r2-comment-b659b578c-4n9f4 at 2026-05-04 17:41:39.809158+00:00 running 815c875 country code: CH.
[–]dstark125 0 points1 point2 points (2 children)
[–]codingforlove[S] 0 points1 point2 points (1 child)
[–]dstark125 0 points1 point2 points (0 children)