diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-16 10:33:15 -0500 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-01-16 18:33:44 -0500 |
commit | b562348d316cbd3a646f33490809c356c591265d (patch) | |
tree | 48a366057f2108859fa6d0da93b9729ee84b331d /Userland/Libraries/LibUnicode | |
parent | 6d710eeb431d4fc729e4692ac8db4270183cd039 (diff) | |
download | serenity-b562348d316cbd3a646f33490809c356c591265d.zip |
LibUnicode: Generate simple case folding mappings for titlecase
Note we already generate the special case foldings for titlecase.
Diffstat (limited to 'Userland/Libraries/LibUnicode')
-rw-r--r-- | Userland/Libraries/LibUnicode/CharacterTypes.cpp | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibUnicode/CharacterTypes.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibUnicode/CharacterTypes.cpp b/Userland/Libraries/LibUnicode/CharacterTypes.cpp index 4b569ff6f4..4ab8b9a691 100644 --- a/Userland/Libraries/LibUnicode/CharacterTypes.cpp +++ b/Userland/Libraries/LibUnicode/CharacterTypes.cpp @@ -38,6 +38,11 @@ u32 __attribute__((weak)) to_unicode_uppercase(u32 code_point) return to_ascii_uppercase(code_point); } +u32 __attribute__((weak)) to_unicode_titlecase(u32 code_point) +{ + return to_ascii_uppercase(code_point); +} + ErrorOr<DeprecatedString> to_unicode_lowercase_full(StringView string, Optional<StringView> const& locale) { StringBuilder builder; diff --git a/Userland/Libraries/LibUnicode/CharacterTypes.h b/Userland/Libraries/LibUnicode/CharacterTypes.h index 553a1b7b49..04ce644d30 100644 --- a/Userland/Libraries/LibUnicode/CharacterTypes.h +++ b/Userland/Libraries/LibUnicode/CharacterTypes.h @@ -38,6 +38,7 @@ u32 canonical_combining_class(u32 code_point); // Use the full-string transformations for full case folding. u32 to_unicode_lowercase(u32 code_point); u32 to_unicode_uppercase(u32 code_point); +u32 to_unicode_titlecase(u32 code_point); ErrorOr<DeprecatedString> to_unicode_lowercase_full(StringView, Optional<StringView> const& locale = {}); ErrorOr<DeprecatedString> to_unicode_uppercase_full(StringView, Optional<StringView> const& locale = {}); |