12#ifndef ZYPP_URL_URLUTILS_H
13#define ZYPP_URL_URLUTILS_H
15#include <zypp-core/url/UrlException.h>
22#define URL_SAFE_CHARS ":/?#[]@!$&'(){}*+,;="
40 typedef std::vector < std::string >
ParamVec;
47 typedef std::map < std::string, std::string >
ParamMap;
85 encode(
const std::string &
str,
const std::string &safe =
"",
106 decode(
const std::string &
str,
bool allowNUL =
false);
162 const std::string &pstr,
163 const std::string &psep);
196 const std::string &pstr,
197 const std::string &psep,
198 const std::string &vsep,
218 const std::string &psep);
245 const std::string &psep,
246 const std::string &vsep,
247 const std::string &safe);
String related utilities and Regular expression matching.
int decode_octet(const char *hex)
Decode one character.
std::string encode_octet(const unsigned char c)
Encode one character.
std::string encode(const std::string &str, const std::string &safe, EEncoding eflag)
Encodes a string using URL percent encoding.
std::map< std::string, std::string > ParamMap
A parameter map container.
std::vector< std::string > ParamVec
A parameter vector container.
void split(ParamVec &pvec, const std::string &pstr, const std::string &psep)
Split into a parameter vector.
std::string join(const ParamVec &pvec, const std::string &psep)
Join parameter vector to a string.
@ E_DECODED
Flag to request decoded string(s).
@ E_ENCODED
Flag to request encoded string(s).
std::string decode(const std::string &str, bool allowNUL)
Decodes a URL percent encoded string.
Easy-to use interface to the ZYPP dependency resolver.