Difference between revisions of "String.len"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Class:''' [[string]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/string|string]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate>Receives a string and returns its length. The empty string "" has length 0. Embedded zeros are counted, so "a\000bc\000" has length 5.</translate>
+
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">
 
<source lang="lua">
 
(number) = string.len(s)
 
(number) = string.len(s)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''s''': (string) <translate>string for which to measure length</translate> <br/>
+
=== Parameters ===
=== <translate>Return values</translate> ===
+
'''s''': (string) string for which to measure length <br/>
'''<translate>Returns</translate>''' (number) <translate>the length of the string</translate><br/>
+
 
 +
=== Return values ===
 +
'''Returns''' (number) the length of the string<br/>
  
 
{{String}}
 
{{String}}

Revision as of 04:50, 20 January 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