Utf8.gmatch: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
'''Available since:''' Gideros 2016.06<br/>
'''<translate>Available since</translate>:''' Gideros 2016.06<br/>
'''Class:''' [[utf8]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/utf8|utf8]]<br/>
 
=== <translate>Description</translate> ===
=== Description ===
<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.
Returns an iterator function that, each time it is called, returns the next captures from pattern over the string ''s''.
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">
<source lang="lua">
(function) = utf8.gmatch(s,pattern)
(function) = utf8.gmatch(s,pattern)
</source>
</syntaxhighlight>
=== <translate>Parameters</translate> ===
 
'''s''': (string) <translate></translate> <br/>
If pattern specifies no captures, then the whole match is produced in each call.
'''pattern''': (string) <translate></translate> <br/>
 
=== <translate>Return values</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>Returns</translate>''' (function) <translate>iterator function</translate><br/>
 
=== Parameters ===
'''s''': (string) <br/>
'''pattern''': (string) <br/>
 
=== Return values ===
'''Returns''' (function) iterator function<br/>


{{Utf8}}
{{Utf8}}

Latest revision as of 20:50, 1 December 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.

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

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.

Parameters

s: (string)
pattern: (string)

Return values

Returns (function) iterator function