change: better regex for removing 'The' when sorting mods

Teh :|

Co-authored-by: timoreo22 <timo.oreo34@gmail.com>
This commit is contained in:
flow 2022-06-30 06:44:53 -03:00
parent e25cdd9d12
commit 5f951e8f21
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -13,7 +13,7 @@ namespace {
// FIXME: wasteful
void RemoveThePrefix(QString& string)
{
QRegularExpression regex(QStringLiteral("^(([Tt][Hh][eE])|([Tt][eE][Hh])) +"));
QRegularExpression regex(QStringLiteral("^(?:the|teh) +"), QRegularExpression::CaseInsensitiveOption);
string.remove(regex);
string = string.trimmed();
}