This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

String format
#3
Use this (.2 specifies the number of decimals):
Code:
value_num = 12.3456
value_str = string.format('%0.2f', value_num)
Reply


Messages In This Thread
String format - by sashhun - 29.11.2021, 08:28
RE: String format - by Daniel - 29.11.2021, 08:28
RE: String format - by admin - 29.11.2021, 08:32
RE: String format - by sashhun - 29.11.2021, 08:34

Forum Jump: