On 5/14/2012 11:41 AM, William Adams wrote:
But, there are lots of little things, like parsing http headers, which strchr and the like can handle, but the pattern matching in lua is much better. For instance, finding/parsing/capturing a digit in a string is as simple as: (%d+) in lua. The C equivalent is a bit more involved. I could use scanf and the like, but I'd rather stick to pure lua.
This library might help, from joyent, the guys behind node.js git://github.com/joyent/http-parser.git "Just ffi-it" :)