Fix issues with line breaks in system font
This commit is contained in:
parent
00bc06e297
commit
b505648c99
2 changed files with 17 additions and 7 deletions
|
@ -223,11 +223,14 @@ void SplitString(const std::string& str, const char delim, std::vector<std::stri
|
|||
|
||||
std::string ReplaceAll(std::string result, const std::string& src, const std::string& dest)
|
||||
{
|
||||
size_t pos = 0;
|
||||
while(1)
|
||||
{
|
||||
const size_t pos = result.find(src);
|
||||
if (pos == result.npos) break;
|
||||
pos = result.find(src, pos);
|
||||
if (pos == result.npos)
|
||||
break;
|
||||
result.replace(pos, src.size(), dest);
|
||||
pos += dest.size();
|
||||
}
|
||||
return result;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue