Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
n7 version 22.10.27 - a johnno update
#1
An update just for johnno Big Grin

https://naalaa.com/n7/N7_221027.zip

Use 'str(x[, int_digits[, dec_digits]])' to format the returned string representation of x. int_digits is the minimum number of digits for the integer part (the string is padded with zeros), and dec_digits is the minimum number of digits for the decimal part.

Release notes

2022-10-27
* Added optional formatting parameters to 'str'
Reply
#2
Note that 'str' has always worked for all variable types (numbers, strings, functions, tables and unset), and it still does. But if you use any of the optional parameters, the expression that you want a string representation of is first converted to a number (0 for everything but number and string). And implicit conversions to string always work like the one parameter version of 'str'.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)