nit: we always put spaces around operators.

In any case, I find the previous code here much more readable; it's hard to see what `i` is here, while the previous version is very readable (except I would name the local variables `expectedSuffixIndex` and `actualSuffixIndex)`