Difference between revisions of "Utf8.codepoint"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2016.06<br/>
'''<translate>Available since</translate>:''' Gideros 2016.06<br/>
+
'''Class:''' [[utf8]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/utf8|utf8]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate>Returns the codepoints (as integers) from all characters in s that start between byte position i and j (both included). The default for i is 1 and for j is i. It raises an error if it meets any invalid byte sequence.</translate>
+
Returns the codepoints (as integers) from all characters in ''s'' that start between byte position ''i'' and ''j'' (both included).
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
(numbers) = utf8.codepoint(s,i,j)
 
(numbers) = utf8.codepoint(s,i,j)
</source>
+
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''s''': (string) <translate></translate> <br/>
+
The default for i is 1 and for j is i. It raises an error if it meets any invalid byte sequence.
'''i''': (number) <translate></translate> '''optional'''<br/>
+
 
'''j''': (number) <translate></translate> '''optional'''<br/>
+
=== Parameters ===
=== <translate>Return values</translate> ===
+
'''s''': (string) <br/>
'''<translate>Returns</translate>''' (numbers) <translate>Returns the codepoints (as integers) from all characters in s</translate><br/>
+
'''i''': (number) '''optional'''<br/>
 +
'''j''': (number) '''optional'''<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (numbers) the codepoints (as integers) from all characters in s<br/>
  
 
{{Utf8}}
 
{{Utf8}}

Latest revision as of 21:34, 1 December 2023

Available since: Gideros 2016.06
Class: utf8

Description

Returns the codepoints (as integers) from all characters in s that start between byte position i and j (both included).

(numbers) = utf8.codepoint(s,i,j)

The default for i is 1 and for j is i. It raises an error if it meets any invalid byte sequence.

Parameters

s: (string)
i: (number) optional
j: (number) optional

Return values

Returns (numbers) the codepoints (as integers) from all characters in s