Since you can access characters in a string the same way you would elements in an array (e.g. using the square bracket notation, as if each character were in a numerical index starting from 0), one way might be to use a [man]for/man loop on string 1 to loop through each character one-by-one.
Inside the loop, you would have another loop that checks if the next character in string 2 matches the one you just read in string 1. If not, continue on to the next character in string 2 until you do find a match (or the string ends).