Difference between revisions of "Table"

From GiderosMobile
(added some missing giderosmtd)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
<!--GIDEROSOBJ:table-->
<!-- GIDEROSOBJ:table -->
+
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]
 
 
<br/>
 
<br/>
 +
'''Available since:''' Gideros 2011.6<br/>
  
'''<translate>Available since</translate>:''' Gideros 2011.6
+
=== Description ===
<br/>
+
This library provides generic functions for table manipulation.
 
 
=== <translate>Description</translate> ===
 
<translate>This library provides generic functions for table manipulation. It provides all its functions inside the table table.</translate>
 
<translate>
 
<br/>
 
  
 
Most functions in the table library assume that the table represents an array or a list. For these functions, when we talk about the "length" of a table we mean the result of the length operator.
 
Most functions in the table library assume that the table represents an array or a list. For these functions, when we talk about the "length" of a table we mean the result of the length operator.
</translate>
 
<br/>
 
  
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== <translate>Methods</translate> ===
+
=== Methods ===
[[Special:MyLanguage/table.concat|table.concat]] ''<translate>returns concatenated table elements i to j separated by sep</translate>''
+
[[table.concat]] ''returns concatenated table elements i to j separated by sep''<br/><!--GIDEROSMTD:table.concat(table,sep,i,j) returns concatenated table elements i to j separated by sep-->
<br/>
+
[[table.getn]] ''returns size of table, or n field, or table.setn value, or 1 less first index with nil value
[[Special:MyLanguage/table.getn|table.getn]] ''<translate>returns size of table, or n field, or table.setn value, or 1 less first index with nil value
+
'''[Deprecated in Lua 5.1, use # operator]'''''<br/>
[Deprecated in Lua 5.1, use # operator]</translate>''
+
[[table.insert]] ''inserts value at location pos in table, default pos=n 1''<br/><!--GIDEROSMTD:table.insert(table,pos,value) inserts value at location pos in table, default pos=n 1-->
<br/>
+
[[table.remove]] ''removes element at pos from table, default pos=n''<br/><!--GIDEROSMTD:table.remove(table,pos) removes element at pos from table, default pos=n-->
[[Special:MyLanguage/table.insert|table.insert]] ''<translate>insert value at location pos in table, default pos=n 1</translate>''
+
[[table.sort]] ''sorts in-place elements 1 to n, comp(v1,v2- true if v1<v2, default <''<br/><!--GIDEROSMTD:table.sort(table,comp) sorts in-place elements 1 to n, comp(v1,v2- true if v1<v2, default <-->
<br/>
 
[[Special:MyLanguage/table.remove|table.remove]] ''<translate>removes element at pos from table, default pos=n</translate>''
 
<br/>
 
[[Special:MyLanguage/table.sort|table.sort]] ''<translate>sorts in-place elements 1 to n, comp(v1,v2- true if v1<v2, default <</translate>''
 
<br/>
 
<!-- GIDEROSMTD:table.sort(table,comp) sorts in-place elements 1 to n, comp(v1,v2- true if v1<v2, default < -->
 
  
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== <translate>Events</translate> ===
+
=== Events ===
=== <translate>Constants</translate> ===
+
=== Constants ===
 
|}
 
|}
  
 
{{GIDEROS IMPORTANT LINKS}}
 
{{GIDEROS IMPORTANT LINKS}}

Revision as of 01:38, 19 March 2021

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2011.6

Description

This library provides generic functions for table manipulation.

Most functions in the table library assume that the table represents an array or a list. For these functions, when we talk about the "length" of a table we mean the result of the length operator.

Methods

table.concat returns concatenated table elements i to j separated by sep
table.getn returns size of table, or n field, or table.setn value, or 1 less first index with nil value [Deprecated in Lua 5.1, use # operator]
table.insert inserts value at location pos in table, default pos=n 1
table.remove removes element at pos from table, default pos=n
table.sort sorts in-place elements 1 to n, comp(v1,v2- true if v1<v2, default <

Events

Constants