Clean up some corescripts

This commit is contained in:
Lewin Kelly 2023-04-17 12:54:48 +01:00
parent 736186bb75
commit 55d3a622aa
11 changed files with 146 additions and 146 deletions

View File

@ -327,19 +327,19 @@ function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1")) return (s:gsub("^%s*(.-)%s*$", "%1"))
end end
function splitByWhitespace(text) -- function splitByWhitespace(text)
if type(text) ~= "string" then -- if type(text) ~= "string" then
return nil -- return nil
end -- end
local terms = {} -- local terms = {}
for token in string.gmatch(text, "[^%s]+") do -- for token in string.gmatch(text, "[^%s]+") do
if string.len(token) > 0 then -- if string.len(token) > 0 then
table.insert(terms, token) -- table.insert(terms, token)
end -- end
end -- end
return terms -- return terms
end -- end
function resetSearchBoxGui() function resetSearchBoxGui()
resetButton.Visible = false resetButton.Visible = false