diff options
Diffstat (limited to 'security/wazuh-manager/files/patch-src-shared_modules-utils_stringHelper.h')
-rw-r--r-- | security/wazuh-manager/files/patch-src-shared_modules-utils_stringHelper.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/security/wazuh-manager/files/patch-src-shared_modules-utils_stringHelper.h b/security/wazuh-manager/files/patch-src-shared_modules-utils_stringHelper.h new file mode 100644 index 000000000000..1b9e9ba27e60 --- /dev/null +++ b/security/wazuh-manager/files/patch-src-shared_modules-utils_stringHelper.h @@ -0,0 +1,40 @@ +--- src/shared_modules/utils/stringHelper.h 2023-12-09 01:08:14.397366000 -0500 ++++ src/shared_modules/utils/stringHelper.h 2023-12-09 12:07:52.155984000 -0500 +@@ -210,6 +210,17 @@ + return leftTrim(rightTrim(str, args), args); + } + ++ static std::string trimToOneSpace(const std::string& str) ++ { ++ std::string str_output; ++ ++ str_output.clear(); ++ std::unique_copy (str.begin(), str.end(), std::back_insert_iterator<std::string>(str_output), ++ [](char a,char b){ return std::isspace(a) && std::isspace(b);}); ++ ++ return str_output; ++ } ++ + static std::string toUpperCase(const std::string& str) + { + std::string temp{ str }; +@@ -219,6 +230,19 @@ + [](std::string::value_type character) + { + return std::toupper(character); ++ }); ++ return temp; ++ } ++ ++ static std::string toLowerCase(const std::string& str) ++ { ++ std::string temp{ str }; ++ std::transform(std::begin(temp), ++ std::end(temp), ++ std::begin(temp), ++ [](std::string::value_type character) ++ { ++ return std::tolower(character); + }); + return temp; + } |