mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 23:59:53 +00:00
LibUnicode: Port Intl.PluralRules to UTF-16 strings
This commit is contained in:
parent
6fe0e13474
commit
abcb2d42bc
Notes:
github-actions[bot]
2025-07-24 08:41:14 +00:00
Author: https://github.com/trflynn89
Commit: abcb2d42bc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5581
5 changed files with 17 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2022-2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -28,7 +28,7 @@ StringView plural_form_to_string(PluralForm plural_form)
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
PluralCategory plural_category_from_string(StringView category)
|
||||
PluralCategory plural_category_from_string(Utf16View const& category)
|
||||
{
|
||||
if (category == "other"sv)
|
||||
return PluralCategory::Other;
|
||||
|
@ -49,7 +49,7 @@ PluralCategory plural_category_from_string(StringView category)
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
StringView plural_category_to_string(PluralCategory category)
|
||||
Utf16View plural_category_to_string(PluralCategory category)
|
||||
{
|
||||
switch (category) {
|
||||
case PluralCategory::Other:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue