wsd: Util::toLower helper

Change-Id: Ibdf9c8e1becdaeac358fa53906593652e05ede72
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2021-03-19 10:13:35 -04:00 committed by Ashod Nakashian
parent d15528ea91
commit 97aa9a06e5

View file

@ -13,6 +13,7 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <algorithm>
#include <atomic>
#include <functional>
#include <memory>
@ -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()
{