Horizon
|
Helper for XML-encoding text (escaping angle brackets, quotes, etc) More...
#include <catch_amalgamated.hpp>
Public Types | |
enum | ForWhat { ForTextNodes , ForAttributes } |
Public Member Functions | |
XmlEncode (StringRef str, ForWhat forWhat=ForTextNodes) | |
void | encodeTo (std::ostream &os) const |
Friends | |
std::ostream & | operator<< (std::ostream &os, XmlEncode const &xmlEncode) |
Helper for XML-encoding text (escaping angle brackets, quotes, etc)
Note: doesn't take ownership of passed strings, and thus the encoded string must outlive the encoding instance.