Difference between revisions of "Table.concat"

From GiderosMobile
(remove language stuff)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/table|table]]<br/>
+
'''Class:''' [[table]]<br/>
=== <translate>Description</translate> ===
+
 
<translate>Given an array where all elements are strings or numbers, returns table[i]..sep..table[i+1] ··· sep..table[j]. The default value for sep is the empty string, the default for i is 1, and the default for j is the length of the table. If i is greater than j, returns the empty string.</translate>
+
=== Description ===
 +
Given an array where all elements are strings or numbers, returns table[i]..sep..table[i+1] ··· sep..table[j].
 +
 
 +
The default value for sep is the empty string, the default for i is 1, and the default for j is the length of the table. If i is greater than j, returns the empty string.
 
<source lang="lua">
 
<source lang="lua">
 
(string) = table.concat(table,sep,i,j)
 
(string) = table.concat(table,sep,i,j)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''table''': (table) <translate>table of values to concatenate</translate> <br/>
+
=== Parameters ===
'''sep''': (string) <translate>separator what to insert between table elements</translate> '''optional'''<br/>
+
'''table''': (table) table of values to concatenate<br/>
'''i''': (number) <translate>concatenate from this element (default is 1)</translate> '''optional'''<br/>
+
'''sep''': (string) separator what to insert between table elements '''optional'''<br/>
'''j''': (number) <translate>concatenate until this element (default is table length)</translate> '''optional'''<br/>
+
'''i''': (number) concatenate from this element (default is 1) '''optional'''<br/>
=== <translate>Return values</translate> ===
+
'''j''': (number) concatenate until this element (default is table length) '''optional'''<br/>
'''<translate>Returns</translate>''' (string) <translate>concatenated string</translate><br/>
+
 
 +
=== Return values ===
 +
'''Returns''' (string) concatenated string<br/>
 +
 
 +
{{Table}}

Revision as of 03:42, 19 January 2021

Available since: Gideros 2011.6
Class: table

Description

Given an array where all elements are strings or numbers, returns table[i]..sep..table[i+1] ··· sep..table[j].

The default value for sep is the empty string, the default for i is 1, and the default for j is the length of the table. If i is greater than j, returns the empty string.

(string) = table.concat(table,sep,i,j)

Parameters

table: (table) table of values to concatenate
sep: (string) separator what to insert between table elements optional
i: (number) concatenate from this element (default is 1) optional
j: (number) concatenate until this element (default is table length) optional

Return values

Returns (string) concatenated string