Difference between revisions of "Utf8.codes"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2016.06<br/> | + | '''<translate>Available since</translate>:''' Gideros 2016.06<br/> |
− | === Description === | + | === <translate>Description</translate> === |
<translate>Returns values so that the construction | <translate>Returns values so that the construction | ||
for p, c in utf8.codes(s) do body end | for p, c in utf8.codes(s) do body end | ||
Line 8: | Line 8: | ||
(iterator) = utf8.codes(s) | (iterator) = utf8.codes(s) | ||
</source> | </source> | ||
− | === Parameters === | + | === <translate>Parameters</translate> === |
'''s''': (string) <translate></translate> <br/> | '''s''': (string) <translate></translate> <br/> | ||
− | === Return values === | + | === <translate>Return values</translate> === |
− | '''Returns''' (iterator) <translate>iterator</translate><br/> | + | '''<translate>Returns</translate>''' (iterator) <translate>iterator</translate><br/> |
Revision as of 07:28, 24 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)
Parameters
s: (string)
Return values
Returns (iterator) iterator