in reply to String matching idea

My idea: xor the strings, find the position of the first non-null character in the result.

Update: no code was requested, so using the spoiler tag:

If your strings only contain "a" and "b", you can use

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ