Difference between revisions of "Utf8.byte"

From GiderosMobile
 
(2 intermediate revisions by 2 users not shown)
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 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.
+
Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j].
Numerical codes are not necessarily portable across platforms.</translate>
+
<syntaxhighlight lang="lua">
<source lang="lua">
 
 
(numbers) = utf8.byte(s,i,j)
 
(numbers) = utf8.byte(s,i,j)
</source>
+
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''s''': (string) <translate></translate> <br/>
+
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.
'''i''': (number) <translate>default is 1</translate> '''optional'''<br/>
+
 
'''j''': (number) <translate></translate> '''optional'''<br/>
+
Numerical codes are not necessarily portable across platforms.
=== <translate>Return values</translate> ===
+
 
'''<translate>Returns</translate>''' (numbers) <translate>Returns the internal numerical codes of the characters</translate><br/>
+
=== Parameters ===
 +
'''s''': (string) string<br/>
 +
'''i''': (number) default is 1 '''optional'''<br/>
 +
'''j''': (number) '''optional'''<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (numbers) returns the internal numerical codes of the characters<br/>
 +
 
 +
{{Utf8}}

Latest revision as of 21:26, 1 December 2023

Available since: Gideros 2016.06
Class: utf8

Description

Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j].

(numbers) = utf8.byte(s,i,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.

Parameters

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

Return values

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