Skip to main content

gmatch

Function gmatch 

Source
pub fn gmatch(state: &mut LuaState) -> Result<usize, LuaError>
Expand description

string.gmatch(s, pattern [, init]) — return an iterator for all matches.

PORT NOTE: C uses lua_newuserdatauv for the GMatchState plus a 3-upvalue C closure. The port stores the two strings as traced closure upvalues and the mutable byte positions in the userdata host payload.