Jump to content
Sign in to follow this  
scifer

Printing % with format

Recommended Posts

I want to print "%" character in a format command like:

hint format["Percent: %1%", _percent];

So it would print "Percent: 10%";

How do I do that?

Share this post


Link to post
Share on other sites

Can't remember if this works:

hint format["Percent: %1%2", _percent, "%"];

Share this post


Link to post
Share on other sites
Can't remember if this works:

hint format["Percent: %1%2", _percent, "%"];

Yes. It works. But it's less convenient to me :(

There might be a special expression like "\n".

Share this post


Link to post
Share on other sites

Didnt test, but I think you can escape the % by putting something like (maybe even %%% dont remember):

hint format["Percent: %1%%", _percent];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×