target but ended up with typed. You may delete at most one character from typed (or delete nothing).
Return the longest common beginning you can achieve: how many leading characters of typed, after the deletion, match the leading characters of target.typed="planxet", target="planet" → 6
Remove the stray x to get "planet": all 6 characters match.
typed="cart", target="card" → 3
Without any removal "car" matches, and no removal improves it.
typed="abc", target="bcd" → 2
Remove the first letter: "bc" matches the start of "bcd".
typed="planxet", target="planet"
6
Run checks the first 3 tests in your browser. Submit checks all 168 tests on the server, hidden ones included.