Cycles: Don't leave multiple spaces in the device name

This commit is contained in:
Sergey Sharybin
2017-06-08 12:15:24 +02:00
parent 45d3e22204
commit 6a546fc73e
2 changed files with 43 additions and 0 deletions

View File

@@ -148,6 +148,12 @@ void string_replace(string& haystack, const string& needle, const string& other)
string string_remove_trademark(const string &s)
{
string result = s;
/* Special case, so we don;t leave sequential spaces behind. */
/* TODO(sergey): Consider using regex perhaps? */
string_replace(result, " (TM)", "");
string_replace(result, " (R)", "");
string_replace(result, "(TM)", "");
string_replace(result, "(R)", "");