DI-Guy Lua AI SDK
 All Classes Files Functions Variables Groups Pages
table Class Reference

Lua's built in table library. More...

Static Public Member Functions

static concat (table[, sep[, i[, j]]])
 returns concatenated table elements i to j separated by sep More...
 
static foreach (table, f)
 executes f(index,value) over all elements of table, returns first non-nil of f More...
 
static foreachi (table, f)
 executes f(index,value) in sequential order 1 to n, returns first non-nil of f More...
 
static getn (table)
 returns size of table, or n field, or table.setn value, or 1 less first index with nil value More...
 
static insert (table,[pos,] value)
 insert value at location pos in table, default pos=n+1 More...
 
static remove (table[, pos])
 removes element at pos from table, default pos=n More...
 
static setn (table, n)
 sets size of table, n field of table if it exists More...
 
static sort (table[, comp])
 sorts in-place elements 1 to n, comp(v1,v2) true if v1<v2, default < More...
 
static len (tab)
 
static print (tab, lead_in_text, indent_count)
 
static copy (t, deep, copy_metas)
 

Detailed Description

Lua's built in table library.

Additions to the lua table library.

Member Function Documentation

static table::concat ( table]]  [, sep[, i[, j])
static

returns concatenated table elements i to j separated by sep

static table::copy ( ,
deep  ,
copy_metas   
)
static
static table::foreach ( table  ,
 
)
static

executes f(index,value) over all elements of table, returns first non-nil of f

static table::foreachi ( table  ,
 
)
static

executes f(index,value) in sequential order 1 to n, returns first non-nil of f

static table::getn ( table  )
static

returns size of table, or n field, or table.setn value, or 1 less first index with nil value

static table::insert ( table  ,
[pos,] value   
)
static

insert value at location pos in table, default pos=n+1

static table::len ( tab  )
static
static table::print ( tab  ,
lead_in_text  ,
indent_count   
)
static
static table::remove ( table  [, pos])
static

removes element at pos from table, default pos=n

static table::setn ( table  ,
 
)
static

sets size of table, n field of table if it exists

static table::sort ( table  [, comp])
static

sorts in-place elements 1 to n, comp(v1,v2) true if v1<v2, default <


The documentation for this class was generated from the following files: