Difference between revisions of "String.len"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === Receives a string and returns its length. The empty string "" has length 0. Embedded zeros are counted...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 +
'''Class:''' [[string]]<br/>
 +
 
=== Description ===
 
=== Description ===
 
Receives a string and returns its length. The empty string "" has length 0. Embedded zeros are counted, so "a\000bc\000" has length 5.
 
Receives a string and returns its length. The empty string "" has length 0. Embedded zeros are counted, so "a\000bc\000" has length 5.
<source lang="lua">
+
<syntaxhighlight lang="lua">
(number), = string.len(s,)
+
(number) = string.len(s)
</source>
+
</syntaxhighlight>
'''s:''' (string) string for which to measure length ''''''<br/>
+
 
 +
=== Parameters ===
 +
'''s''': (string) string for which to measure length <br/>
 +
 
 +
=== Return values ===
 
'''Returns''' (number) the length of the string<br/>
 
'''Returns''' (number) the length of the string<br/>
 +
 +
{{String}}

Latest revision as of 15:33, 13 July 2023

Available since: Gideros 2011.6
Class: string

Description

Receives a string and returns its length. The empty string "" has length 0. Embedded zeros are counted, so "a\000bc\000" has length 5.

(number) = string.len(s)

Parameters

s: (string) string for which to measure length

Return values

Returns (number) the length of the string