Answers for "lua how to check if a string containsa word"

1

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

Code answers related to "lua how to check if a string containsa word"

Browse Popular Code Answers by Language