summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/unicode.cpp
diff options
context:
space:
mode:
author npwoods <npwoods@alumni.cmu.edu>2017-07-30 01:16:45 -0400
committer Vas Crabb <cuavas@users.noreply.github.com>2017-07-30 15:16:45 +1000
commitaca90520de001f09ac1bc6863028ae4bc8988db5 (patch)
treef319c7afcfc450a7b5490a4fb21c959f43506ac8 /src/lib/util/unicode.cpp
parent3076e3a22b67966f8947e1a11b2ff30c6c2ccfa1 (diff)
Imgtool: Merged normalize_filename() into cannonicalize_path(), C++-ification (#2527)
Diffstat (limited to 'src/lib/util/unicode.cpp')
-rw-r--r--src/lib/util/unicode.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp
index b48cef44c79..ed0f336d275 100644
--- a/src/lib/util/unicode.cpp
+++ b/src/lib/util/unicode.cpp
@@ -469,6 +469,28 @@ std::string normalize_unicode(const char *s, size_t length, unicode_normalizatio
//-------------------------------------------------
+// uchar_toupper - uses utf8proc to convert to
+// upper case
+//-------------------------------------------------
+
+char32_t uchar_toupper(char32_t ch)
+{
+ return utf8proc_toupper(ch);
+}
+
+
+//-------------------------------------------------
+// uchar_tolower - uses utf8proc to convert to
+// lower case
+//-------------------------------------------------
+
+char32_t uchar_tolower(char32_t ch)
+{
+ return utf8proc_tolower(ch);
+}
+
+
+//-------------------------------------------------
// utf8_previous_char - return a pointer to the
// previous character in a string
//-------------------------------------------------