wsd: Util::toLower helper
Change-Id: Ibdf9c8e1becdaeac358fa53906593652e05ede72 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
parent
d15528ea91
commit
97aa9a06e5
1 changed files with 8 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue