9 #ifndef ZYPP_CORE_PARSER_JSON_JSON_STRING_DEFINED 10 #define ZYPP_CORE_PARSER_JSON_JSON_STRING_DEFINED 23 typedef unsigned char uchar;
26 for(
const auto &r : val_r )
57 val_r.resize( val_r.size() + add,
'@' );
58 auto w( val_r.rbegin() );
62 for ( ; r != val_r.rend(); ++r )
64 if ( uchar(*r) < 32u )
66 static const char * digit =
"0123456789abcdef";
90 *w++ = digit[uchar(*r) % 15];
91 *w++ = digit[uchar(*r) / 16];
101 switch ( (*w++ = *r) )
139 operator std::string()
const {
149 {
return str << asJSON(); }
bool operator==(const Capability &lhs, const Capability &rhs)
relates: Capability
ZYPP_API std::ostream & operator<<(std::ostream &str, const Bool &obj)
relates: Bool Stream output
String & operator=(const std::string &set)
String related utilities and Regular expression matching.
std::ostream & dumpOn(std::ostream &str) const
Stream output.
std::string strEncode(std::string val_r)
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Provides API related macros.
String(const std::string &val)
String(const char *val_r)
bool operator<(const Capability &lhs, const Capability &rhs)
relates: Capability Arbitrary order.
std::string asJSON() const
JSON representation.
String(std::string &&val)