Fork of strung.lua in hopes of removing uses of the ffi library for use in restricted environments (such as Garry's Mod)
Note performance is likely worse than original patterns since this does not make use of the ffi library. This was made to prevent deadlocks with bad lua patterns by doing cpu limiting in lua.
You can include/require the strung.lua
file alone.
local strung = require "strung"
strung.find("foobar", "b(%l*)") --> 4, 6, "ar"
Alternatively, you can .install()
the library, and have it replace the original functions completely.
strung.install()
print(string.find == strung.find) --> true
S = "foo"
S:match "[^f]*" --> "oo", using `strung.match` rather than `string.match`