Garry's Mod Wiki

tostring

string tostring( any value )

Description

Attempts to convert the value to a string. If the value is an object and its metatable has defined the __tostring metamethod, this will call that function.

print also uses this functionality.

Arguments

1 any value
The object to be converted to a string.

Returns

1 string
The string representation of the value.

Example

Convert a number to a string.

print(tostring(0x16))
Output: 22

Page Links


Special Pages


Wikis

?

Render Time: 160ms

DB GetPage 31
Generate Html 7
SaveChanges (1) 107
Render Body 0
Render Sidebar 12