tostring

Top  Previous  Next

Definition

str = table.tostring( t )

 

Name

Type

Description

str

string

Table displayed as string

t

table

Table to format as string

Example

local t = {

 a=10; 

 b=20; 

 c= { 

         sub1= 2; 

         sub2= 3 

 } 

}

 

print ( table.tostring( t ) )

 

This will print:

 

{ -- #0

   ["a"] = 10,

   ["c"] = { -- #1

       ["sub2"] = 3,

       ["sub1"] = 2,

   } -- #1,

   ["b"] = 20,

} -- #0