lua-users home
lua-l archive

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

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
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.