Shadowfist/pokemon-online — comment on commit 823dd728fe48202928bf133574064c751b30584b
File:  line 0
By coyotte508:

is rtloverride a mark non spacing character? If yes, then the special check should be removed.

Also, instead of the inefficient multiple replace i like something like that better:

```QString result = s;
int y = -1;

for (int x = 0; x < s.size(); x++) {
if (s[x].category() != QChar::Mark_NonSpacing && s[x] != rtloverride) {
if (y==-1) {
continue;
} else {
y++;
result[y] = x;
}
} else {
y = x;
}
}

if (y != -1) {
result.resize(y);
}```

This is a lot more efficient as you go through the string only once in every case (instead of twice at the minimum but a lot more if needing a replace)