From 8b33a3a7e647d7aaea6d6541279a1922aa4db36e Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Tue, 17 Jun 2025 14:15:39 +0300 Subject: [PATCH] - add strx::lowercase() call --- src/engine/helper/HL_String.cpp | 7 +++++++ src/engine/helper/HL_String.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/engine/helper/HL_String.cpp b/src/engine/helper/HL_String.cpp index bd5296a6..f6165bcf 100644 --- a/src/engine/helper/HL_String.cpp +++ b/src/engine/helper/HL_String.cpp @@ -409,6 +409,13 @@ std::string strx::uppercase(const std::string& s) return r; } +std::string strx::lowercase(const std::string& s) +{ + std::string r(s); + std::transform(r.begin(), r.end(), r.begin(), ::tolower); + return r; +} + std::string strx::removeQuotes(const std::string& s) { std::string r(s); diff --git a/src/engine/helper/HL_String.h b/src/engine/helper/HL_String.h index 550ef114..c49446cf 100644 --- a/src/engine/helper/HL_String.h +++ b/src/engine/helper/HL_String.h @@ -70,6 +70,7 @@ public: static bool endsWith(const std::string& s, const std::string& suffix); static int stringToDuration(const std::string& s); static std::string uppercase(const std::string& s); + static std::string lowercase(const std::string& s); static std::string removeQuotes(const std::string& s); };