Search
 
SCRIPT & CODE EXAMPLE
 

LUA

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
Comment

check if string contains word lua

ourstring = "example"
if string.match(ourstring,"ex") then
   print(ourstring.." contains ex!"
end

-- OR

if string.find(ourstring,"ex") then
   print(ourstring.." contains ex!"
end
Comment

PREVIOUS NEXT
Code Example
Lua :: Get number of values in a table lua 
Lua :: lua exponent 
Lua :: how to get a random number in lua 
Lua :: luau region3 
Lua :: kill player when something touchd lua 
Lua :: how to print hello in lua 
Lua :: luau how to make debounce 
Lua :: roblox part tween 
Lua :: lua table is empty 
Lua :: roblox table.find 
Lua :: length of table lua 
Lua :: string to int lua 
Lua :: how to get the length of a table in lua 
Lua :: lua type of 
Lua :: roblox how to detect human touchinhg 
Lua :: roblox studio rain 
Lua :: check if child is touched roblox 
Lua :: roblox format string 
Lua :: lua stack 
Lua :: <font color="" roblox 
Lua :: roblox lua 
Matlab :: matlab number to string 
Matlab :: scilab plot 2d function 
Basic :: how to open d drive using conda prompt 
Basic :: floppy disk drive +arduino 
Elixir :: elixir string regex 
Elixir :: elixir comparison 2 different data types 
Scala :: scala remove element from list 
Actionscript :: cannot connect to rabbitmq localhost inside docker container 
Excel :: excel or function 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =