diff options
Diffstat (limited to 'security/wazuh-agent/files/patch-src-shared_modules-utils_stringHelper.h')
-rw-r--r-- | security/wazuh-agent/files/patch-src-shared_modules-utils_stringHelper.h | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/security/wazuh-agent/files/patch-src-shared_modules-utils_stringHelper.h b/security/wazuh-agent/files/patch-src-shared_modules-utils_stringHelper.h index 1b9e9ba27e60..fa94a0278e65 100644 --- a/security/wazuh-agent/files/patch-src-shared_modules-utils_stringHelper.h +++ b/security/wazuh-agent/files/patch-src-shared_modules-utils_stringHelper.h @@ -1,14 +1,14 @@ ---- 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); +--- src/shared_modules/utils/stringHelper.h.orig 2024-10-17 00:22:27.000000000 -0700 ++++ src/shared_modules/utils/stringHelper.h 2024-10-19 23:58:11.231439000 -0700 +@@ -256,6 +256,17 @@ + return ret; } + static std::string trimToOneSpace(const std::string& str) + { -+ std::string str_output; ++ std::string str_output; + -+ str_output.clear(); ++ 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);}); + @@ -17,24 +17,4 @@ + 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; - } + std::string temp {str}; |