← WoW Lua
Returns the string representation of any value.
s = tostring(arg);
Arguments[edit | edit source]
- arg
- Any - Value to convert to a string.
Returns[edit | edit source]
- s
- String - string representation of the argument; possibly provided by the argument's metatable.
Examples[edit | edit source]
tostring(123) --Returns "123" tostring({}) --Returns "table: ###" tostring(function() end) --Returns "function: ###" tostring(nil) --Returns "nil" tostring(true) --Returns "true"
Community content is available under CC-BY-SA unless otherwise noted.