lib/tests: rework in terms of Mu::Message

This commit is contained in:
Dirk-Jan C. Binnema
2022-04-22 08:06:12 +03:00
parent 9b8353fc37
commit 9e9e16a7ec
4 changed files with 207 additions and 309 deletions

View File

@ -149,12 +149,7 @@ Mu::utf8_clean(const std::string& dirty)
g_string_append_unichar(gstr, uc);
}
std::string clean(gstr->str, gstr->len);
clean.erase(0, clean.find_first_not_of(" "));
clean.erase(clean.find_last_not_of(" ") + 1); // remove trailing space
return clean;
return std::string{g_strstrip(gstr->str)};
}
std::string