9#ifndef ZYPP_CORE_PARSER_JSON_JSON_STRING_DEFINED
10#define ZYPP_CORE_PARSER_JSON_JSON_STRING_DEFINED
20 typedef unsigned char uchar;
22 std::string::size_type add = 2;
23 for(
const auto &r : val_r )
54 val_r.resize( val_r.size() + add,
'@' );
55 auto w( val_r.rbegin() );
59 for ( ; r != val_r.rend(); ++r )
61 if ( uchar(*r) < 32u )
63 static const char * digit =
"0123456789abcdef";
87 *w++ = digit[uchar(*r) % 15];
88 *w++ = digit[uchar(*r) / 16];
98 switch ( (*w++ = *r) )
136 operator std::string()
const {
String(std::string &&val)
String(const std::string &val)
String(String &&)=default
String & operator=(const std::string &set)
friend bool operator==(const String &lhs, const String &rhs)
String(const char *val_r)
std::ostream & operator<<(std::ostream &str, const String &obj)
Stream output.
String & operator=(const String &)=default
String & operator=(String &&)=default
std::string asJSON() const
JSON representation.
String(const String &)=default
bool operator<(const String &other) const
std::ostream & dumpOn(std::ostream &str) const
Stream output.
String related utilities and Regular expression matching.
std::string strEncode(std::string val_r)