diff options
author | 2019-03-26 11:13:37 +1100 | |
---|---|---|
committer | 2019-03-26 11:13:37 +1100 | |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/lib/util/unicode.h | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
Diffstat (limited to 'src/lib/util/unicode.h')
-rw-r--r-- | src/lib/util/unicode.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/util/unicode.h b/src/lib/util/unicode.h index 5e30a74916e..46e1aec3496 100644 --- a/src/lib/util/unicode.h +++ b/src/lib/util/unicode.h @@ -14,14 +14,16 @@ singular 32-bit Unicode chars. ***************************************************************************/ +#ifndef MAME_LIB_UTIL_UNICODE_H +#define MAME_LIB_UTIL_UNICODE_H #pragma once -#ifndef UNICODE_H -#define UNICODE_H +#include "osdcore.h" + +#include <string> #include <stdlib.h> -#include "osdcore.h" @@ -95,6 +97,7 @@ bool uchar_is_digit(char32_t uchar); int uchar_from_utf8(char32_t *uchar, const char *utf8char, size_t count); int uchar_from_utf16(char32_t *uchar, const char16_t *utf16char, size_t count); int uchar_from_utf16f(char32_t *uchar, const char16_t *utf16char, size_t count); +std::u32string ustr_from_utf8(const std::string &utf8str); // converting 32-bit Unicode chars to strings int utf8_from_uchar(char *utf8string, size_t count, char32_t uchar); @@ -107,9 +110,9 @@ std::wstring wstring_from_utf8(const std::string &utf8string); std::string utf8_from_wstring(const std::wstring &string); // unicode normalization -std::string normalize_unicode(const std::string &s, unicode_normalization_form normalization_form); -std::string normalize_unicode(const char *s, unicode_normalization_form normalization_form); -std::string normalize_unicode(const char *s, size_t length, unicode_normalization_form normalization_form); +std::string normalize_unicode(const std::string &s, unicode_normalization_form normalization_form, bool fold_case = false); +std::string normalize_unicode(const char *s, unicode_normalization_form normalization_form, bool fold_case = false); +std::string normalize_unicode(const char *s, size_t length, unicode_normalization_form normalization_form, bool fold_case = false); // upper and lower case char32_t uchar_toupper(char32_t ch); @@ -137,4 +140,4 @@ bool utf8_is_valid_string(const char *utf8string); #define utf16le_from_uchar utf16f_from_uchar #endif -#endif /* UNICODE_H */ +#endif // MAME_LIB_UTIL_UNICODE_H |