lua-users home
lua-l archive

string.gmatch confusion

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


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?
Cheers,
Mitchell

AltStyle によって変換されたページ (->オリジナル) /