From cb718def0cb51aac4c2125e3864522740fcb2573 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 18:02:24 +0100 Subject: Put utils::tolower definition in its own cpp file --- src/utils/tolower.cpp | 13 +++++++++++++ src/utils/tolower.hpp | 9 +-------- 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 src/utils/tolower.cpp (limited to 'src/utils') diff --git a/src/utils/tolower.cpp b/src/utils/tolower.cpp new file mode 100644 index 0000000..3e518bd --- /dev/null +++ b/src/utils/tolower.cpp @@ -0,0 +1,13 @@ +#include + +namespace utils +{ + std::string tolower(const std::string& original) + { + std::string res; + res.reserve(original.size()); + for (const char c: original) + res += static_cast(std::tolower(c)); + return res; + } +} diff --git a/src/utils/tolower.hpp b/src/utils/tolower.hpp index 22d2b8f..0019182 100644 --- a/src/utils/tolower.hpp +++ b/src/utils/tolower.hpp @@ -5,14 +5,7 @@ namespace utils { - std::string tolower(const std::string& original) - { - std::string res; - res.reserve(original.size()); - for (const char c: original) - res += static_cast(std::tolower(c)); - return res; - } + std::string tolower(const std::string& original); } #endif // SPLIT_INCLUDED -- cgit v1.2.3