Difference between revisions of "Utf8.codes"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2016.06<br/> === Description === Returns values so that the construction for p, c in utf8.codes(s) do body end will iterate over all c...") |
|||
Line 6: | Line 6: | ||
will iterate over all characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence. | will iterate over all characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence. | ||
<source lang="lua"> | <source lang="lua"> | ||
− | (iterator) | + | (iterator) = utf8.codes(s) |
</source> | </source> | ||
− | '''s | + | '''s''': (string) ''''''<br/> |
'''Returns''' (iterator) iterator<br/> | '''Returns''' (iterator) iterator<br/> |
Revision as of 10:20, 23 August 2018
Available since: Gideros 2016.06
Description
Returns values so that the construction for p, c in utf8.codes(s) do body end will iterate over all characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence.
(iterator) = utf8.codes(s)
's: (string) '
Returns (iterator) iterator