Difference between revisions of "Utf8.codepoint"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2016.06<br/> === Description === Returns the codepoints (as integers) from all characters in s that start between byte position i and...")
 
Line 4: Line 4:
 
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.
 
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.
 
<source lang="lua">
 
<source lang="lua">
(numbers), = utf8.codepoint(sij,)
+
(numbers) = utf8.codepoint(s,i,j)
 
</source>
 
</source>
'''s:''' (string)  ''''''<br/>
+
'''s''': (string)  ''''''<br/>
'''i:''' (number)  '''optional'''<br/>
+
'''i''': (number)  '''optional'''<br/>
'''j:''' (number)  '''optional'''<br/>
+
'''j''': (number)  '''optional'''<br/>
 
'''Returns''' (numbers) Returns the codepoints (as integers) from all characters in s<br/>
 
'''Returns''' (numbers) Returns the codepoints (as integers) from all characters in s<br/>

Revision as of 11:21, 23 August 2018

Available since: Gideros 2016.06

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.

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

's: (string) '
i: (number) optional
j: (number) optional
Returns (numbers) Returns the codepoints (as integers) from all characters in s