We're a place where coders share, stay up-to-date and grow their careers.
Here's a simple solution in Lua:
local function palindrome(input) input = input:lower():gsub("[^a-z0-9]", "") return input:find(input:sub(1, math.floor(#input/2)):reverse().."$") end
Here's a simple solution in Lua: