mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-26 14:26:23 +02:00
Add "\n" parsing to i18n code. Move some code from Common.
This commit is contained in:
@@ -211,3 +211,14 @@ void SplitString(const std::string& str, const char delim, std::vector<std::stri
|
||||
|
||||
output.pop_back();
|
||||
}
|
||||
|
||||
std::string ReplaceAll(std::string result, const std::string& src, const std::string& dest)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
const size_t pos = result.find(src);
|
||||
if (pos == result.npos) break;
|
||||
result.replace(pos, src.size(), dest);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user