lua-users home
lua-l archive

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


From: "Thatcher Ulrich" <tu@tulrich.com>
> I took the liberty of putting together the bare bones of a Binary
> Module system for Lua 4.0, based on Ignacio's uselib code.

      Lua Fuzzy
                 wiki



A very simple Lua extension that only defines one function 'fuzzy'.

loadmodule("fuzzy")
thetext = [[A lnger Text to saerch]]
searchstr = "longer"
print(fuzzy(thetext,searchstr))
-- gives about 54.54
-- while
print(fuzzy(thetext,"longer"))
-- gives 100, a complete match

This Lua extension was built to be used with the 'loadmodule' by Thatcher
Ulrich LuaBinaryModules

Main goal was to write a 'tutorial' like minimal extension that is
completely seft-sufficent, only requiring one C source file.

A Win32 Lua binary, the compiled luafuzzy.dll along with the source can be
downloaded [1].

PNG image

PNG image