Skip to content

Vararg

Inherits: LibTSMModule

Functions

In

lua
function Lua.Vararg.In(value, ...)
  -> boolean

Returns whether not the value exists within the vararg.

Parameters:

NameTypeDescription
valueanyThe value to search for
...anyAny number of values to search in

Returns:

TypeDescription
boolean

IntoTable

lua
function Lua.Vararg.IntoTable(tbl, ...)

Stores a varag into a table.

Parameters:

NameTypeDescription
tbltableThe table to store the values in
...anyZero or more values to store in the table

Iterator

lua
function Lua.Vararg.Iterator(...)
  -> fun():number, any, table, number

Creates an iterator from a vararg. NOTE: This iterator must be run to completion and not be interrupted (i.e. with a break or return).

Parameters:

NameTypeDescription
...anyThe values to iterate over

Returns:

TypeDescription
fun():number, anyIterator with fields: index, value
table
number