Simple C++ solution
\nclass Solution {\npublic:\n    void replaceAll(std::string& str, const std::string& from, const std::string& to) {\n        if(from.empty())\n            retu
```\nclass Solution {\npublic:\n    void replaceAll(std::string& str, const std::string& from, const std::string& to) {\n        if(from.empty())\n            return;\n        size_t start_pos = 0;\n        while((start_pos = str.find(from, start_pos)) != std::string::npos) {\n            str.replace(start_pos, from.length(), to);\n            start_pos += to.length(); // In case \'to\' contains \'from\', like replacing \'x\' with \'yx\'\n        }\n    }\n    \n    \n    string entityParser(string text) {\n        replaceAll(text, "&quot;", "\\"");\n        replaceAll(text, "&apos;", "\\\'");\n        replaceAll(text, "&amp;", "&");\n        replaceAll(text, "&gt;", ">");\n        replaceAll(text, "&lt;", "<");\n        replaceAll(text, "&frasl;", "/");\n        return text;\n    }\n};\n```
['C']