Converts a type to a string. |
||
Syntax |
s = tostring(v) |
|
Arguments |
Name |
Description |
v |
A variable of any type. |
|
Outputs |
Name |
Description |
s |
A string. |
|
Example |
Syntax |
|
print(tostring(true)) print(tostring(1)) print(tostring(0+1i)) print(tostring([1])) print(tostring([0+1i])) print(tostring('hml1')) |
||
Comments |
s = tostring(v) converts a type to a string. For better control of how numbers are converted, use 'string.format' or 'SetNumberFormat'. |
|
See Also:string.format in the Formatting topic SetNumberFormat in the Miscellaneous - Utility Functions topic |