[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Tweaking string.gsub so it's yieldable
- From: Patrick Donnelly <batrick@...>
- Date: Tue, 23 Dec 2014 17:07:00 -0500
On Tue, Dec 23, 2014 at 3:03 PM, Soni L. <fakedme@gmail.com> wrote:
> How can I tweak string.gsub so it's yieldable?
>
> More specifically I want my tweaked Lua to support this:
>
> c = coroutine.create(function() return string.gsub("test", ".",
> coroutine.yield) end)
> for i = 1, 4 do
> print(coroutine.resume(c))
> end
What's wrong with string.gmatch?
--
Patrick Donnelly