How to make a GUI number with zeroes. Fx. 0001 not just 1

I’m not sure how to explain this, but I would like to when my GUI displays fx. health. It would write it as 005% instead of just 5%. Like when you round up numbers with .ToString(“F1”)

0.05f.ToString("000%")

this will return “005%” if you use float from 0 to 1

5.ToString().PadLeft(3, '0') + "%"

gives same result, if you use int from 0 to 100

There is a lot of interesting things you can do with strings formatting :slight_smile: nice examples