mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +00:00
LibJS+LibLocale: Port Intl.NumberFormat to String
This commit is contained in:
parent
76fd5f2756
commit
0c2efa285a
13 changed files with 169 additions and 149 deletions
|
@ -1,13 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibLocale/Forward.h>
|
||||
|
@ -64,13 +65,13 @@ Optional<StringView> get_number_system_symbol(StringView locale, StringView syst
|
|||
Optional<NumberGroupings> get_number_system_groupings(StringView locale, StringView system);
|
||||
|
||||
Optional<Span<u32 const>> get_digits_for_number_system(StringView system);
|
||||
DeprecatedString replace_digits_for_number_system(StringView system, StringView number);
|
||||
ErrorOr<String> replace_digits_for_number_system(StringView system, StringView number);
|
||||
|
||||
Optional<NumberFormat> get_standard_number_system_format(StringView locale, StringView system, StandardNumberFormatType type);
|
||||
Vector<NumberFormat> get_compact_number_system_formats(StringView locale, StringView system, CompactNumberFormatType type);
|
||||
Vector<NumberFormat> get_unit_formats(StringView locale, StringView unit, Style style);
|
||||
|
||||
Optional<DeprecatedString> augment_currency_format_pattern(StringView currency_display, StringView base_pattern);
|
||||
Optional<DeprecatedString> augment_range_pattern(StringView range_separator, StringView lower, StringView upper);
|
||||
ErrorOr<Optional<String>> augment_currency_format_pattern(StringView currency_display, StringView base_pattern);
|
||||
ErrorOr<Optional<String>> augment_range_pattern(StringView range_separator, StringView lower, StringView upper);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue