move code responsible for replacing content in strings to Replace()

This commit is contained in:
Andrzej Rybczak
2009-10-10 15:36:51 +02:00
parent 63fbdaae1f
commit f6f7a8a27e
5 changed files with 15 additions and 15 deletions

View File

@@ -315,8 +315,7 @@ std::string GetLineValue(std::string &line, char a, char b, bool once)
}
pos[0]++;
std::string result = pos[0] >= 0 && pos[1] >= 0 ? line.substr(pos[0], pos[1]-pos[0]) : "";
for (i = result.find("\\\""); i != std::string::npos; i = result.find("\\\""))
result.replace(i, 2, "\"");
Replace(result, "\\\"", "\"");
return result;
}