first, you need a threshold for how close the match has to be. is 1 letter ok?
second, decide if it must match from the beginning, or beginning of a word eg does do work for "odor"?
Then if you don't want to use another library, loop through each char and continue until you reach the threshold or the end of the string
In other words, if the name is "Long dude one" and the search string is "dude", then start at name[0] and do a 4-iteration loop (four letters in dude) and check each one with the corresponding one from name. If any letter does not match, exit that loop. Then do the same thing starting from name[1] to name[4], then from name[2] to name[5] etc all the way until you are checking the last 4 letters of the search string " one" against dude. However, you wouldn't get that far because on the 6th attempt, eg looping through name[5] to name[8] all 4 letters would match so you would set match=true and exit.
put that in a function and call it for each name.