diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-07-01 23:34:50 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-07-01 23:34:50 -0700 |
commit | 4c662109404c79440a62888ae8babff81ce1b71e (patch) | |
tree | b94fb6d602c0160a74465d110e0b67b953500138 /src/NormalizeCaseInsensitiveString.cpp | |
parent | b9fed2eae03f6fb67c0497e486b2bbfec8b27a44 (diff) |
Add NormalizeCaseInsensitiveString function
Diffstat (limited to 'src/NormalizeCaseInsensitiveString.cpp')
-rw-r--r-- | src/NormalizeCaseInsensitiveString.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/NormalizeCaseInsensitiveString.cpp b/src/NormalizeCaseInsensitiveString.cpp new file mode 100644 index 0000000..761c72a --- /dev/null +++ b/src/NormalizeCaseInsensitiveString.cpp @@ -0,0 +1,24 @@ +/** + * @file NormalizeCaseInsensitiveString.cpp + * + * This module contains the implementation of the + * Uri::NormalizeCaseInsensitiveString function. + * + * © 2018 by Richard Walters + */ + +#include "NormalizeCaseInsensitiveString.hpp" + +#include <ctype.h> + +namespace Uri { + + std::string NormalizeCaseInsensitiveString(const std::string& inString) { + std::string outString; + for (char c: inString) { + outString.push_back(tolower(c)); + } + return outString; + } + +} |