core: Fix a typo in str::levdistance

I made a typo in `str::levdistance` in my str pull request. This fixes it.