Garry's Mod Wiki

Garry's Mod Wiki

  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.

Output: 22

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...