AR_Engine_SDK
函数
tableEx.lua 文件参考

函数

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)
 

函数说明

◆ append()

function table append ( ,
 
)

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

参数
atable
btable

◆ clear()

function table clear ( )

clear 清空一个table

参数
ttable

◆ count()

function table count ( ,
value   
)

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

参数
ttable
valueany 元素

◆ equal()

function table equal ( ,
 
)

equal 判断两个table是否相同

参数
atable
btable

◆ filter()

function table filter ( ,
fn   
)

filter

参数
ttable
fntable

◆ hasvalue()

function table hasvalue ( ,
value   
)

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

参数
ttable
valueany

◆ indexof()

function table indexof ( array  ,
value  ,
begin   
)

indexof

参数
arraytable
valuetable
begintable

◆ insertto()

function table insertto ( dest  ,
src  ,
begin   
)

insertto

参数
desttable
srctable
begintable

◆ keyof()

function table keyof ( hashtable  ,
value   
)

keyof

参数
hashtabletable
valuetable

◆ keys()

function table keys ( hashtable  )

keys

参数
hashtabletable

◆ len()

function table len ( )

len 计算table的长度

参数
ttable

◆ map()

function table map ( ,
fn   
)

map

参数
ttable
fntable

◆ merge() [1/2]

function table merge ( ,
 
)

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

参数
atable
btable

◆ merge() [2/2]

function table merge ( dest  ,
src   
)

merge

参数
desttable
srctable

◆ nums()

function table nums ( )

nums

参数
ttable

◆ prepose()

function table prepose ( ,
 
)

prepose 将b表前置插入a表

参数
atable
btable

◆ removebyvalue()

function table removebyvalue ( array  ,
value  ,
removeall   
)

removebyvalue

参数
arraytable
valuetable
removealltable

◆ removevalue()

function table removevalue ( ,
 
)

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

参数
ttable
vtable

◆ unique() [1/2]

function table unique ( )

unique

参数
ttable

◆ unique() [2/2]

function table unique ( ,
bArray   
)

unique

参数
ttable
bArraytable

◆ values()

function table values ( hashtable  )

values

参数
hashtabletable

◆ walk()

function table walk ( ,
fn   
)

walk

参数
ttable
fntable