lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, 29 Aug 2022 11:03:44 -0400
Mitchell <lists@triplequasar.com> wrote:

> Hi,
> 
> I must be missing something:
> 
> > for i in string.gmatch('foobar', '.', 4) do print(i) end
> f
> o
> o
> b
> a
> r
> 
> I expect only the characters from 'bar' to be printed since I am passing the 'init' argument to string.gmatch.
> 
> What am I missing or not understanding?

Never mind. This parameter didn't exist in Lua 5.3.

Sorry for the noise.

Mitchell