48 std::string
dirname(
const std::string& path);
58 std::string
basename(
const std::string& path,
bool delsuffix =
false);
65 std::string
suffix(
const std::string& path);
72 bool strtol(
const char* nptr,
long& n);
78 void replace(std::string& text,
const std::string& searchText,
const std::string& replaceText);
Contains utility classes and functions. Most of these are wrappers for common C functions that do not...
Definition: utils.cpp:45
std::string basename(const std::string &path, bool delsuffix)
Get the filename component from the path string. See basename(3). If the delsuffix parameter is true,...
Definition: utils.cpp:72
std::string dirname(const std::string &path)
Get the directory component from the path string. See dirname(3).
Definition: utils.cpp:50
std::string suffix(const std::string &path)
Get the suffix from the path string. Normally, the suffix is the substring of the basename of path fr...
Definition: utils.cpp:89
void replace(std::string &text, const std::string &searchText, const std::string &replaceText)
Replaces all occurrences of searchText in the text string by replaceText.
Definition: utils.cpp:110
bool strtol(const char *nptr, long &n)
Convert a C string to a long value, which is returned in n. Returns true if the conversion is success...
Definition: utils.cpp:99