AR_Engine_SDK
Functions
tableEx.lua File Reference

Functions

function table append (a, b)
 
function table clear (t)
 
function table count (t, value)
 
function table equal (a, b)
 
function table hasvalue (t, value)
 
function table len (t)
 
function table merge (a, b)
 
function table prepose (a, b)
 
function table removevalue (t, v)
 
function table unique (t)
 
function table nums (t)
 
function table keys (hashtable)
 
function table values (hashtable)
 
function table merge (dest, src)
 
function table insertto (dest, src, begin)
 
function table indexof (array, value, begin)
 
function table keyof (hashtable, value)
 
function table removebyvalue (array, value, removeall)
 
function table map (t, fn)
 
function table walk (t, fn)
 
function table filter (t, fn)
 
function table unique (t, bArray)
 

Function Documentation

◆ append()

function table append ( ,
 
)

Generated by EmmyLua(https://github.com/EmmyLua) Created by HongjieFu. DateTime: 2019-08-29 18:58append 仅用于数组 把b数组拼接到a数组中

Parameters
atable
btable

◆ clear()

function table clear ( )

clear 清空一个table

Parameters
ttable

◆ count()

function table count ( ,
value   
)

count 判断table中有几个指定元素

Parameters
ttable
valueany 元素

◆ equal()

function table equal ( ,
 
)

equal 判断两个table是否相同

Parameters
atable
btable

◆ filter()

function table filter ( ,
fn   
)

filter

Parameters
ttable
fntable

◆ hasvalue()

function table hasvalue ( ,
value   
)

hasvalue 判断table中是否包含某一元素

Parameters
ttable
valueany

◆ indexof()

function table indexof ( array  ,
value  ,
begin   
)

indexof

Parameters
arraytable
valuetable
begintable

◆ insertto()

function table insertto ( dest  ,
src  ,
begin   
)

insertto

Parameters
desttable
srctable
begintable

◆ keyof()

function table keyof ( hashtable  ,
value   
)

keyof

Parameters
hashtabletable
valuetable

◆ keys()

function table keys ( hashtable  )

keys

Parameters
hashtabletable

◆ len()

function table len ( )

len 计算table的长度

Parameters
ttable

◆ map()

function table map ( ,
fn   
)

map

Parameters
ttable
fntable

◆ merge() [1/2]

function table merge ( ,
 
)

merge 将b表合并到a表中(a、b中存在同名元素时b中的元素将会覆盖a中的元素)

Parameters
atable
btable

◆ merge() [2/2]

function table merge ( dest  ,
src   
)

merge

Parameters
desttable
srctable

◆ nums()

function table nums ( )

nums

Parameters
ttable

◆ prepose()

function table prepose ( ,
 
)

prepose 将b表前置插入a表

Parameters
atable
btable

◆ removebyvalue()

function table removebyvalue ( array  ,
value  ,
removeall   
)

removebyvalue

Parameters
arraytable
valuetable
removealltable

◆ removevalue()

function table removevalue ( ,
 
)

removevalue 在table中移除一个与v相等的元素

Parameters
ttable
vtable

◆ unique() [1/2]

function table unique ( )

unique

Parameters
ttable

◆ unique() [2/2]

function table unique ( ,
bArray   
)

unique

Parameters
ttable
bArraytable

◆ values()

function table values ( hashtable  )

values

Parameters
hashtabletable

◆ walk()

function table walk ( ,
fn   
)

walk

Parameters
ttable
fntable