C++ String Replace
\nstring entityParser(string text) \n{\n\treplaceString(text, "&quot;", "\\"");\n\treplaceString(text, "&apos;", "\\\'");\n\treplaceString(text, "&amp;", "&");\
```\nstring entityParser(string text) \n{\n\treplaceString(text, "&quot;", "\\"");\n\treplaceString(text, "&apos;", "\\\'");\n\treplaceString(text, "&amp;", "&");\n\treplaceString(text, "&gt;", ">");\n\treplaceString(text, "&lt;", "<");\n\treplaceString(text, "&frasl;", "/");\n\n\treturn text;\n}\n\nvoid replaceString(string& text, const string& search, const string& replace)\n{\n\tauto i = 0;\n\twhile((i = text.find(search, i)) != string::npos)\n\t{\n\t\ttext.replace(i, search.length(), replace);\n\t\ti += replace.size();\n\t}\n}\n```
[]