Difference between revisions of "Utf8.byte"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 6: Line 6:
 
<translate>Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j]. The default value for i is 1; the default value for j is i. These indices are corrected following the same rules of function string.sub.
 
<translate>Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j]. The default value for i is 1; the default value for j is i. These indices are corrected following the same rules of function string.sub.
 
Numerical codes are not necessarily portable across platforms.</translate>
 
Numerical codes are not necessarily portable across platforms.</translate>
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(numbers) = utf8.byte(s,i,j)
 
(numbers) = utf8.byte(s,i,j)
 
</source>
 
</source>

Revision as of 14:32, 13 July 2023


Available since: Gideros 2016.06
Class: utf8

Description

Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j]. The default value for i is 1; the default value for j is i. These indices are corrected following the same rules of function string.sub. Numerical codes are not necessarily portable across platforms. <syntaxhighlight lang="lua"> (numbers) = utf8.byte(s,i,j) </source>

Parameters

s: (string)
i: (number) default is 1 optional
j: (number) optional

Return values

Returns (numbers) Returns the internal numerical codes of the characters