Garry's Mod Wiki

table.ToString

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", }

Page Links


Special Pages


Wikis

?

Render Time: 62ms

DB GetPage 23
Generate Html 10
SaveChanges (1) 9
Render Body 0
Render Sidebar 18