Vararg

The Vararg module provides utility functions for dealing with varargs.

API

class Lua.Vararg: LibTSMModule
staticmethod IntoTable(tbl: table, ...: any)

Stores a varag into a table.

Parameters:
  • tbl (table) – The table to store the values in

  • ... (any) – Zero or more values to store in the table

staticmethod Iterator(...: any): 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:

... (any) – The values to iterate over

Returns:

_1 (fun(): number, any) – Iterator with fields: index, value

staticmethod In(value: any, ...: any): boolean

Returns whether not the value exists within the vararg.

Parameters:
  • value (any) – The value to search for

  • ... (any) – Any number of values to search in