9951 explained code solutions for 126 technologies


luaHow to find substring in a string


start,stop = string.find("Hi all of you", "all")ctrl + c
string.find

finds given substring in a given string

"Hi all of you"

string to search in

"all"

string to search for

start

found substring start position

stop

found substring end position