From aca90520de001f09ac1bc6863028ae4bc8988db5 Mon Sep 17 00:00:00 2001 From: npwoods Date: Sun, 30 Jul 2017 01:16:45 -0400 Subject: Imgtool: Merged normalize_filename() into cannonicalize_path(), C++-ification (#2527) --- src/lib/util/unicode.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/lib/util/unicode.cpp') 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 @@ -468,6 +468,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 -- cgit v1.2.3-70-g09d2