+ applied style guide
This commit is contained in:
parent
80b5db16b5
commit
8d9c2bea4e
3 changed files with 53 additions and 5 deletions
|
@ -598,10 +598,11 @@ with another string.
|
|||
\param replacement the string that is the replacement for the character
|
||||
*/
|
||||
void json::replaceChar(std::string& str, char c, const std::string& replacement)
|
||||
const
|
||||
const
|
||||
{
|
||||
size_t start_pos = 0;
|
||||
while((start_pos = str.find(c, start_pos)) != std::string::npos) {
|
||||
while ((start_pos = str.find(c, start_pos)) != std::string::npos)
|
||||
{
|
||||
str.replace(start_pos, 1, replacement);
|
||||
start_pos += replacement.length();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue