-
-
Save creationix/70936904f18d496cd1a9e7706f54974d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local b = "" | |
while true do | |
while not b:find("\r\n", 1, true) do | |
local v, e = r() | |
if v then | |
b = b .. v | |
else | |
print("ERROR", e) | |
end | |
end | |
local v = b:sub(1, b:find('\r\n', 1, true) - 1) | |
b = b:sub(b:find('\r\n', 1, true) + 2) | |
DO_STUFF_WITH_v_HERE | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment