aboutsummaryrefslogtreecommitdiff
path: root/src/NormalizeCaseInsensitiveString.cpp
diff options
context:
space:
mode:
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;
+ }
+
+}