9#ifndef ZYPP_CORE_PARSER_JSON_JSON_STRING_DEFINED
10#define ZYPP_CORE_PARSER_JSON_JSON_STRING_DEFINED
23 typedef unsigned char uchar;
25 std::string::size_type add = 2;
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 {
151 bool operator< (
const String &other )
const {
Provides API related macros.
String(std::string &&val)
String(const std::string &val)
String(String &&)=default
String & operator=(const std::string &set)
String(const char *val_r)
String & operator=(const String &)=default
String & operator=(String &&)=default
std::string asJSON() const
JSON representation.
String(const String &)=default
std::ostream & dumpOn(std::ostream &str) const
Stream output.
String related utilities and Regular expression matching.
std::string strEncode(std::string val_r)
ZYPP_API std::ostream & operator<<(std::ostream &str, const Bool &obj)
relates: Bool Stream output
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.