FrameworkZ 10.8.3
Provides a framework for Project Zomboid with various systems.
Loading...
Searching...
No Matches
FrameworkZ::Utilities Class Reference

Public Member Functions

void __GenOrderedIndex (t)
 
table CopyTable (originalTable, tableCopies, shouldCopyMetatable)
 Copies a table.
 
void DumpTable (tbl)
 
void GetPrettyDuration (timeInSeconds)
 
void GetRandomNumber (min, max, keepLeadingZeros)
 
void IsExterior (square)
 
void IsSemiExterior (square)
 
void IsTrulyInterior (square)
 
void MergeTables (t1, t2)
 
void OrderedNext (t, state)
 
void OrderedPairs (t)
 
void Pack (...)
 
void PrintTable (tbl)
 
void RemoveContextDuplicates (worldObjects)
 
void TableContainsKey (t, key)
 
void TableContainsValue (t, value)
 
void TableIsEmpty (t)
 
string TrimString (str, maxLength, addEllipsis)
 Trims a string to a maximum length, optionally adding ellipsis.
 
void Unpack (t)
 
mixed WordWrapText (text, maxLength, eolDelimiter)
 Word wraps text to a specified length.
 

Detailed Description

Definition at line 2 of file Utilities.lua.

Member Function Documentation

◆ __GenOrderedIndex()

void __GenOrderedIndex ( t )

◆ CopyTable()

table CopyTable ( originalTable ,
tableCopies ,
shouldCopyMetatable  )

Copies a table.

Parameters
originalTabletable The table to copy.
tableCopiestable (Internal) The table of copies used internally by the function.
Returns
table The copied table.

◆ DumpTable()

void DumpTable ( tbl )

◆ GetPrettyDuration()

void GetPrettyDuration ( timeInSeconds )

◆ GetRandomNumber()

void GetRandomNumber ( min ,
max ,
keepLeadingZeros  )

◆ IsExterior()

void IsExterior ( square )

◆ IsSemiExterior()

void IsSemiExterior ( square )

◆ IsTrulyInterior()

void IsTrulyInterior ( square )

◆ MergeTables()

void MergeTables ( t1 ,
t2  )

◆ OrderedNext()

void OrderedNext ( t ,
state  )

◆ OrderedPairs()

void OrderedPairs ( t )

◆ Pack()

void Pack ( ...)

◆ PrintTable()

void PrintTable ( tbl )

◆ RemoveContextDuplicates()

void RemoveContextDuplicates ( worldObjects )

◆ TableContainsKey()

void TableContainsKey ( t ,
key  )

◆ TableContainsValue()

void TableContainsValue ( t ,
value  )

◆ TableIsEmpty()

void TableIsEmpty ( t )

◆ TrimString()

string TrimString ( str ,
maxLength ,
addEllipsis  )

Trims a string to a maximum length, optionally adding ellipsis.

Parameters
strstring The string to trim.
maxLength\int The maximum allowed length.
addEllipsisboolean (Optional) If true, appends "..." if trimmed.
Returns
string The trimmed string.

◆ Unpack()

void Unpack ( t )

◆ WordWrapText()

mixed WordWrapText ( text ,
maxLength ,
eolDelimiter  )

Word wraps text to a specified length.

Parameters
textstring The text to word wrap.
maxLength\int The maximum length of a line (default: 28).
eolDelimiterstring (Optional) The end of line delimiter. Returns a table of lines if not supplied.
Returns
mixed The word wrapped text as a string or a table of lines of text if no eolDelimiter was supplied as an argument.

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