Difference between revisions of "Utf8.gmatch"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2016.06<br/> === Description === Returns an iterator function that, each time it is called, returns the next captures from pattern ove...")
 
Line 5: Line 5:
 
For this function, a caret '^' at the start of a pattern does not work as an anchor, as this would prevent the iteration.
 
For this function, a caret '^' at the start of a pattern does not work as an anchor, as this would prevent the iteration.
 
<source lang="lua">
 
<source lang="lua">
(function), = utf8.gmatch(spattern,)
+
(function) = utf8.gmatch(s,pattern)
 
</source>
 
</source>
'''s:''' (string)  ''''''<br/>
+
'''s''': (string)  ''''''<br/>
'''pattern:''' (string)  ''''''<br/>
+
'''pattern''': (string)  ''''''<br/>
 
'''Returns''' (function) iterator function<br/>
 
'''Returns''' (function) iterator function<br/>

Revision as of 11:21, 23 August 2018

Available since: Gideros 2016.06

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.

(function) = utf8.gmatch(s,pattern)

's: (string) '
'pattern: (string) '
Returns (function) iterator function