Difference between revisions of "Utf8.gmatch"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 6: | Line 6: | ||
<translate>Returns an iterator function that, each time it is called, returns the next captures from pattern over the string s. If pattern specifies no captures, then the whole match is produced in each call. | <translate>Returns an iterator function that, each time it is called, returns the next captures from pattern over the string s. If pattern specifies no captures, then the whole match is produced in each call. | ||
For this function, a caret '^' at the start of a pattern does not work as an anchor, as this would prevent the iteration.</translate> | For this function, a caret '^' at the start of a pattern does not work as an anchor, as this would prevent the iteration.</translate> | ||
− | < | + | <syntaxhighlight lang="lua"> |
(function) = utf8.gmatch(s,pattern) | (function) = utf8.gmatch(s,pattern) | ||
</source> | </source> |
Revision as of 14:32, 13 July 2023
Available since: Gideros 2016.06
Class: utf8
Description
Returns an iterator function that, each time it is called, returns the next captures from pattern over the string s. If pattern specifies no captures, then the whole match is produced in each call. For this function, a caret '^' at the start of a pattern does not work as an anchor, as this would prevent the iteration. <syntaxhighlight lang="lua"> (function) = utf8.gmatch(s,pattern) </source>
Parameters
s: (string)
pattern: (string)
Return values
Returns (function) iterator function