aboutsummaryrefslogtreecommitdiff
path: root/include/Utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Utils.hpp')
-rw-r--r--include/Utils.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/Utils.hpp b/include/Utils.hpp
index e7bb3bc..3d3c029 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -4,7 +4,6 @@
#include <string_view>
#include <map>
#include <string>
-#include <optional>
namespace gsr {
struct KeyValue {
@@ -15,6 +14,9 @@ namespace gsr {
using StringSplitCallback = std::function<bool(std::string_view line)>;
void string_split_char(std::string_view str, char delimiter, StringSplitCallback callback_func);
+ bool starts_with(std::string_view str, const char *substr);
+ bool ends_with(std::string_view str, const char *substr);
+ std::string strip(const std::string &str);
std::string get_home_dir();
std::string get_config_dir();
@@ -24,6 +26,8 @@ namespace gsr {
std::map<std::string, std::string> get_xdg_variables();
std::string get_videos_dir();
+ std::string get_pictures_dir();
+
// Returns 0 on success
int create_directory_recursive(char *path);
bool file_get_content(const char *filepath, std::string &file_content);