26 a.insert(
a.begin(), 2 );
28 a.insert(
a.begin(), 5 );
30 a.insert(
a.begin(), 1 );
212 string val =
"/a//foo/";
236 string val =
"/a//foo/";
289 "Multiline: value1\n"
297 "Name: second record\n";
298 stringstream
input(data, ios_base::in);
340 "Name: value # comment\n"
342 "Multiline: value1 # comment \n"
348 "Name: second record\n";
349 stringstream
input(data, ios_base::in);
std::string remainder() const
Definition string.h:363
Split a string where a given substring is found.
Definition string.h:315
Parse a record of Yaml-style field: value couples.
Definition string.h:436
Singular< X > singular(const X &x)
Definition list.h:331
Append< X, Y > append(const X &x, const Y &y)
Definition list.h:336
std::string join(const ITER &begin, const ITER &end, const std::string &sep=", ")
Definition string.h:406
std::string trim(const std::string &str, const FUN &classifier)
Return the substring of 'str' without all leading and trailing characters for which 'classifier' retu...
Definition string.h:187
std::string normpath(const std::string &pathname)
Normalise a pathname.
Definition string.cpp:133
std::string urlencode(const std::string &str)
Urlencode a string.
Definition string.cpp:160
std::string c_unescape(const std::string &str, size_t &lenParsed)
Unescape a C string, stopping at the first double quotes or at the end of the string.
Definition string.cpp:424
std::string dirname(const std::string &pathname)
Given a pathname, return the directory name without the file name.
Definition string.h:134
std::string toupper(const std::string &str)
Convert a string to uppercase.
Definition string.h:228
std::string urldecode(const std::string &str)
Decode an urlencoded string.
Definition string.cpp:178
bool endsWith(const std::string &str, const std::string &part)
Check if a string ends with the given substring.
Definition string.h:162
std::string encodeBase64(const std::string &str)
Encode a string in Base64.
Definition string.cpp:208
std::string appendpath(const std::string &path1, const std::string &path2)
Definition string.h:277
std::string decodeBase64(const std::string &str)
Decode a string encoded in Base64.
Definition string.cpp:241
bool startsWith(const std::string &str, const std::string &part)
Check if a string starts with the given substring.
Definition string.h:154
std::string c_escape(const std::string &str)
Escape the string so it can safely used as a C string inside double quotes.
Definition string.cpp:400
std::string ucfirst(const std::string &str)
Return the same string, with the first character uppercased.
Definition string.h:248
std::string joinpath(const std::string &path1, const std::string &path2)
Join two paths, adding slashes when appropriate.
Definition string.h:257
std::string fmtf(const char *f,...)
Definition string.cpp:113
std::string tolower(const std::string &str)
Convert a string to lowercase.
Definition string.h:238
std::string basename(const std::string &pathname)
Given a pathname, return the file name without its path.
Definition string.h:124
std::string fmt(const char *f,...)
Definition string.cpp:123
#define assert_eq(x, y)
Definition test.h:33
#define assert(x)
Definition test.h:30