Difference between revisions of "Utf8.codepoint"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<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>
 
<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>
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(numbers) = utf8.codepoint(s,i,j)
 
(numbers) = utf8.codepoint(s,i,j)
 
</source>
 
</source>

Revision as of 15:32, 13 July 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). The default for i is 1 and for j is i. It raises an error if it meets any invalid byte sequence. <syntaxhighlight lang="lua"> (numbers) = utf8.codepoint(s,i,j) </source>

Parameters

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

Return values

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