![]() | |||||||||
| |||||||||
Lua-ApiString |
[LUA 5.1] string.gmatchfunction string.gmatch ( s, pattern )
Returns an iterator function that, each time it is called, returns the next captures from pattern over string s. If pattern specifies no captures, then the whole match is produced in each call. As an example, the following loop, which will iterate over all the words from string s, printing one per line. Code s = "hello world from Lua" The next example collects all pairs key=value from the given string into a table: Code t = {} Comments |
||||||||
| © 2007 DracoBlue :: Valid XHTML, CSS, RSS Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC | SourceNet © 2007, DracoBlue :: Page created in 0.406 seconds with 24 queries. | |||||||||