24 op = std::string(
"start ").append(url);
26 op = std::string(
"xdg-open ").append(url);
37template <
typename T>
int min(T value1, T value2)
39 return value1 < value2 ? value1 : value2;
49 size_t lastIndex = path.find_last_of(
"\\/");
50 std::string filename = path;
51 if (std::string::npos != lastIndex)
53 filename.erase(0, lastIndex + 1);
57 const size_t periodIndex = filename.rfind(
'.');
58 if (std::string::npos != periodIndex)
60 filename.erase(periodIndex);
std::string getFileName(const std::string &path)
Get filename from file path.
Definition: utils.h:47
int min(T value1, T value2)
Get min value.
Definition: utils.h:37
void openWebLink(std::string url)
Open url in default web browser.
Definition: utils.h:20