Answers for "lua check if string is letter"

2

if string contains lua

str = "This is some text containing the word tiger."
if string.find(str, "tiger") then
  print ("The word tiger was found.")
else
  print ("The word tiger was not found.")
end
Posted by: Guest on July-15-2021
0

lua check if string is number

local function isInteger(str)

  return not (str == "" or str:find("%D"))  -- str:match("%D") also works

end
Posted by: Guest on July-18-2021

Code answers related to "lua check if string is letter"

Browse Popular Code Answers by Language