i'm making a search bar and it only shows the first character in the string when a search for it
Spoiler
Posted 18 July 2013 - 04:49 PM
Posted 18 July 2013 - 04:58 PM
local entries = {
"hello",
"how",
"does",
"this",
"work",
"test"
}
local searchInEntries = function(key)
-- * will return a table of entries which contain the key
local result = {}
for ixEnt = 1, #entries do if string.find(entries[ixEnt], key) then table.insert(result, entries[ixEnt]) end end
return result
endMore at http://lua-users.org...LibraryTutorial
Posted 18 July 2013 - 05:45 PM
Posted 18 July 2013 - 05:51 PM
0 members, 2 guests, 0 anonymous users