From 01f23292bf2451a0c7b9ada88c6314dcb09509b1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 12 Nov 2022 19:05:13 +0100 Subject: Matrix: add option to silence invites without declining them or hiding them (ignore) --- include/Path.hpp | 5 +++++ include/StringUtils.hpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Path.hpp b/include/Path.hpp index 3d849e2..c9047be 100644 --- a/include/Path.hpp +++ b/include/Path.hpp @@ -22,6 +22,11 @@ namespace QuickMedia { return *this; } + Path& append(const char *str) { + data += str; + return *this; + } + // Includes extension const char* filename() const { size_t index = data.rfind('/'); diff --git a/include/StringUtils.hpp b/include/StringUtils.hpp index fb16d7a..2a01f54 100644 --- a/include/StringUtils.hpp +++ b/include/StringUtils.hpp @@ -7,8 +7,8 @@ namespace QuickMedia { // Return false to stop iterating using StringSplitCallback = std::function; - void string_split(const std::string &str, const std::string &delimiter, StringSplitCallback callback_func); - void string_split(const std::string &str, char delimiter, StringSplitCallback callback_func); + void string_split(const std::string &str, const std::string &delimiter, StringSplitCallback callback_func, bool include_empty = true); + void string_split(const std::string &str, char delimiter, StringSplitCallback callback_func, bool include_empty = true); // Returns the number of replaced substrings size_t string_replace_all(std::string &str, char old_char, char new_char); // Returns the number of replaced substrings -- cgit v1.2.3