From 97aa9a06e5e76ef7003faae5118410df993c5180 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Fri, 19 Mar 2021 10:13:35 -0400 Subject: [PATCH] wsd: Util::toLower helper Change-Id: Ibdf9c8e1becdaeac358fa53906593652e05ede72 Signed-off-by: Ashod Nakashian --- common/Util.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/Util.hpp b/common/Util.hpp index e1629ed1b..4ac7bb2cc 100644 --- a/common/Util.hpp +++ b/common/Util.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1186,6 +1187,13 @@ int main(int argc, char**argv) return pair.second ? pair : std::make_pair(def, false); } + /// Converts and returns the argument to lower-case. + inline std::string toLower(std::string s) + { + std::transform(s.begin(), s.end(), s.begin(), ::tolower); + return s; + } + /// Get system_clock now in miliseconds. inline int64_t getNowInMS() {