mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00:00
Meta+LibUnicode: Provide code point names through library
This commit is contained in:
parent
4bd4ce439a
commit
b06b54772e
4 changed files with 97 additions and 2 deletions
|
@ -222,6 +222,18 @@ u32 to_unicode_uppercase(u32 code_point)
|
|||
#endif
|
||||
}
|
||||
|
||||
Optional<StringView> code_point_display_name([[maybe_unused]] u32 code_point)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
auto name = Detail::code_point_display_name(code_point);
|
||||
if (name.is_null())
|
||||
return {};
|
||||
return name;
|
||||
#else
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
|
||||
String to_unicode_lowercase_full(StringView string, [[maybe_unused]] Optional<StringView> locale)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
|
|
|
@ -19,6 +19,8 @@ namespace Unicode {
|
|||
u32 to_unicode_lowercase(u32 code_point);
|
||||
u32 to_unicode_uppercase(u32 code_point);
|
||||
|
||||
Optional<StringView> code_point_display_name(u32 code_point);
|
||||
|
||||
String to_unicode_lowercase_full(StringView, Optional<StringView> locale = {});
|
||||
String to_unicode_uppercase_full(StringView, Optional<StringView> locale = {});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue