Lua pattern replace uppercase letters
snippet in lua

Lua pattern replace uppercase letters

user3569

function lowercase(str)
  return (str:gsub("%u", function(c) return ' ' .. c:lower() end))
end

print(lowercase("TestStringOne"))
print(lowercase("this isA TestString"))