mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 12:18:56 +00:00
Meta+LibUnicode: Provide code point names through library
This commit is contained in:
parent
4bd4ce439a
commit
b06b54772e
Notes:
sideshowbarker
2024-07-18 00:59:17 +09:00
Author: https://github.com/BenWiederhake
Commit: b06b54772e
Pull-request: https://github.com/SerenityOS/serenity/pull/10964
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/trflynn89
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