Home » Community » Newbie corner » Formatting text with percent sign
Re: Formatting text with percent sign [message #49897 is a reply to message #49896] |
Thu, 31 May 2018 22:15   |
 |
Klugier
Messages: 1106 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
I tested Oblivions solution and it works. And then I try to recompile with Tom's example, but it doesn't work:
Cout() << Format("% %%", 12.3) << "\n"; // 12
Cout() << Format("% %%%%", 12.3) << "\n"; // 12 - this doesn't work too, did you test it Tom?
Cout() << Format("%.1f%%", 12.3) << "\n"; // 12.3%
Cout() << Format("%.1f %%", 12.3) << "\n"; // 12.3 %
I think the correct implementation that should be in our documentation is that what Oblivion posted. I updated my todays patch and submitted it to trunk.
URL's:
- Format documentation
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Thu, 31 May 2018 22:20] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Aug 24 19:59:48 CEST 2025
Total time taken to generate the page: 0.07035 seconds
|