mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibJS+LibUnicode: Port Intl.ListFormat to UTF-16 strings
This commit is contained in:
parent
7d80aabbdb
commit
db2148b44a
Notes:
github-actions[bot]
2025-07-24 08:41:31 +00:00
Author: https://github.com/trflynn89
Commit: db2148b44a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5581
7 changed files with 39 additions and 33 deletions
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2024-2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Utf16String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibUnicode/Locale.h>
|
||||
|
||||
|
@ -27,11 +27,11 @@ public:
|
|||
|
||||
struct Partition {
|
||||
StringView type;
|
||||
String value;
|
||||
Utf16String value;
|
||||
};
|
||||
|
||||
virtual String format(ReadonlySpan<String> list) const = 0;
|
||||
virtual Vector<Partition> format_to_parts(ReadonlySpan<String> list) const = 0;
|
||||
virtual Utf16String format(ReadonlySpan<Utf16String> list) const = 0;
|
||||
virtual Vector<Partition> format_to_parts(ReadonlySpan<Utf16String> list) const = 0;
|
||||
|
||||
protected:
|
||||
ListFormat() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue