aboutsummaryrefslogtreecommitdiff
path: root/src/NormalizeCaseInsensitiveString.cpp
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2018-07-01 23:34:50 -0700
committerRichard Walters <rwalters@digitalstirling.com>2018-07-01 23:34:50 -0700
commit4c662109404c79440a62888ae8babff81ce1b71e (patch)
treeb94fb6d602c0160a74465d110e0b67b953500138 /src/NormalizeCaseInsensitiveString.cpp
parentb9fed2eae03f6fb67c0497e486b2bbfec8b27a44 (diff)
Add NormalizeCaseInsensitiveString function
Diffstat (limited to 'src/NormalizeCaseInsensitiveString.cpp')
-rw-r--r--src/NormalizeCaseInsensitiveString.cpp24
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;
+ }
+
+}