Does anyone know of a way to check a string value (Or Keywords) for another string value
Example :
I want to Look for the Word : Dog
String to search for Dog : HelloHowIsYourDog?IHeardHimBarkingYesterday
Does anyone know of a way to check a string value (Or Keywords) for another string value
Example :
I want to Look for the Word : Dog
String to search for Dog : HelloHowIsYourDog?IHeardHimBarkingYesterday
You can use the string.find()
function, where the first parameter is the string you want to search and the second parameter is the keyword you want to find.
Example:
if string.find("HelloHowIsYourDog?IHeardHimBarkingYesterday", "Dog") then
print("I found dog in the string!")
end