Difference between revisions of "String.byte"

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> ===
 
<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.
 
  
Note that numerical codes are not necessarily portable across platforms.</translate>
+
=== Description ===
 +
Returns the internal numerical codes of the characters s[i], s[i+1], ···, s[j].
 
<source lang="lua">
 
<source lang="lua">
 
(numbers) = string.byte(s,i,j)
 
(numbers) = string.byte(s,i,j)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''s''': (string) <translate>string to get numerical codes from</translate> <br/>
+
The default value for i is 1; the default value for j is i.
'''i''': (number) <translate>start symbol (default = 1)</translate> '''optional'''<br/>
+
 
'''j''': (number) <translate>end symbol (defaults = i)</translate> '''optional'''<br/>
+
Returns nil if index out of range.
=== <translate>Return values</translate> ===
+
 
'''<translate>Returns</translate>''' (numbers) <translate>numerical codes of characters in provided range</translate><br/>
+
'''Numerical codes are not necessarily portable across platforms.'''
 +
 
 +
=== Parameters ===
 +
'''s''': (string) string to get numerical codes from<br/>
 +
'''i''': (number) start symbol (default = 1) '''optional'''<br/>
 +
'''j''': (number) end symbol (defaults = i) '''optional'''<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (numbers) numerical codes of characters in provided range or nil<br/>
  
 
{{String}}
 
{{String}}

Revision as of 07:55, 7 December 2020

Available since: Gideros 2011.6
Class: string

Description

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

(numbers) = string.byte(s,i,j)

The default value for i is 1; the default value for j is i.

Returns nil if index out of range.

Numerical codes are not necessarily portable across platforms.

Parameters

s: (string) string to get numerical codes from
i: (number) start symbol (default = 1) optional
j: (number) end symbol (defaults = i) optional

Return values

Returns (numbers) numerical codes of characters in provided range or nil