26#include <zypp/base/String.h>
82 struct KVMapBase :
public std::map<std::string,std::string> {
87 using map_type = std::map<std::string, std::string>;
99 return( find(
key_r ) != end() );
105 template<
char kv,
char f>
117 std::vector<std::string>
fields;
120 for (
unsigned i = 0;
i <
fields.size(); ++
i ) {
122 if (
pos == std::string::npos ) {
141 if ( !
ret.empty() ) {
145 if ( !
it->second.empty() ) {
173 template<
typename KVMapOpts>
198 template<
typename KVMapOpts>
200 {
return str <<
obj.asString(); }
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
String related utilities and Regular expression matching.
unsigned split(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", const Trim trim_r=NO_TRIM)
Split line_r into words.
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
A map of (key,value) strings.
std::string asString() const
KVMap(const map_type &map_r)
KVMap(const std::string &str_r)
KVMapPolicy for KVMaps using a single char as separator (e.g.
Base class for KVMaps, (key,value) pairs.
bool has(const std::string &key_r) const
Test whether key is set.
KVMapBase(const map_type &kvmap_r)
std::map< std::string, std::string > map_type
(key,value) map type
static map_type split(const std::string &str_r, const KVMapPolicy &opts_r)
Split str_r into (key,value) map, using the separators defined by opts_r.
static std::string join(const map_type &kvmap_r, const KVMapPolicy &opts_r)
Join (key,value) map into string, using the separators defined by opts_r.
KVMapPolicy for conversion of KVMaps to/from string.
KVMapPolicy(std::string kvsplit_r, std::string fsplit_r)
KVMapPolicy(std::string kvsplit_r, std::string fsplit_r, std::string kvjoin_r)
KVMapPolicy(std::string kvsplit_r, std::string fsplit_r, std::string kvjoin_r, std::string fjoin_r)