StendhalScripting/LuaAPI: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
String Manipulation: new methods "string.isNumber" & "string.builder"
imported>AntumDeluge
Line 307: Line 307:
The following methods have been added to the built-in Lua [https://www.lua.org/manual/5.3/manual.html#6.6 table] library.
The following methods have been added to the built-in Lua [https://www.lua.org/manual/5.3/manual.html#6.6 table] library.


* ''<span style="color:green;">table.clean</span>(tbl)''
; ''<span style="color:green;">table.clean</span>(tbl)''
** Removes <code>nil</code> values from a table.
: Removes <code>nil</code> values from a table.
** <span style="color:darkgreen; text-style=italic;">tbl:</span> The table to be cleaned.
: '''''tbl:''''' The table to be cleaned.
** returns: Copy of <code>tbl</code> with <code>nil</code> values removed.
: ''returns:'' Copy of <code>tbl</code> with <code>nil</code> values removed.

* ''<span style="color:green;">table.concat</span>(tbl1, tbl2)''
; ''<span style="color:green;">table.concat</span>(tbl1, tbl2)''
** Merges the contents of one table into another.
: Merges the contents of one table into another.
** <span style="color:darkgreen; text-style=italic;">tbl1:</span> The table receiving the new content.
** <span style="color:darkgreen; text-style=italic;">tbl2:</span> The table containing the content to be copied.
: '''''tbl1:''''' The table receiving the new content.
: '''''tbl2:''''' The table containing the content to be copied.


= See Also =
= See Also =