Garry's Mod Wiki

Garry's Mod Wiki

  string table.ToString( table tbl, string displayName, boolean niceFormatting )

Description

Converts a table into a string

Arguments

1 table tbl
The table to iterate over.
2 string displayName
Optional. A name for the table.
3 boolean niceFormatting
Adds new lines and tabs to the string.

Returns

1 string
The table formatted as a string.

Example

Demonstrates the use of this function.

local Table = { Red = "Apple", Green = "Celery", Yellow = "Banana"} local String = table.ToString( Table, "Fruit and Vegetable", true ) print( String )
Output:
Fruit and Vegetable = { Red = "Apple", Green = "Celery", Yellow = "Banana", }

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...