mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS+LibUnicode: Remove unused FormatNumericToString AO
This commit is contained in:
parent
b019633558
commit
8cec9e7557
Notes:
github-actions[bot]
2025-07-08 15:20:36 +00:00
Author: https://github.com/trflynn89
Commit: 8cec9e7557
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5354
4 changed files with 0 additions and 23 deletions
|
@ -145,12 +145,6 @@ int currency_digits(StringView currency)
|
|||
return 2;
|
||||
}
|
||||
|
||||
// 16.5.3 FormatNumericToString ( intlObject, x ), https://tc39.es/ecma402/#sec-formatnumerictostring
|
||||
String format_numeric_to_string(NumberFormatBase const& intl_object, MathematicalValue const& number)
|
||||
{
|
||||
return intl_object.formatter().format_to_decimal(number.to_value());
|
||||
}
|
||||
|
||||
// 16.5.4 PartitionNumberPattern ( numberFormat, x ), https://tc39.es/ecma402/#sec-partitionnumberpattern
|
||||
Vector<Unicode::NumberFormat::Partition> partition_number_pattern(NumberFormat const& number_format, MathematicalValue const& number)
|
||||
{
|
||||
|
|
|
@ -180,7 +180,6 @@ private:
|
|||
};
|
||||
|
||||
JS_API int currency_digits(StringView currency);
|
||||
JS_API String format_numeric_to_string(NumberFormatBase const& intl_object, MathematicalValue const& number);
|
||||
JS_API Vector<Unicode::NumberFormat::Partition> partition_number_pattern(NumberFormat const&, MathematicalValue const& number);
|
||||
JS_API String format_numeric(NumberFormat const&, MathematicalValue const& number);
|
||||
JS_API GC::Ref<Array> format_numeric_to_parts(VM&, NumberFormat const&, MathematicalValue const& number);
|
||||
|
|
|
@ -616,21 +616,6 @@ public:
|
|||
return icu_string_to_string(result);
|
||||
}
|
||||
|
||||
virtual String format_to_decimal(Value const& value) const override
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
auto formatted = format_impl(value);
|
||||
if (!formatted.has_value())
|
||||
return {};
|
||||
|
||||
auto result = formatted->toDecimalNumber<StringBuilder>(status);
|
||||
if (icu_failure(status))
|
||||
return {};
|
||||
|
||||
return MUST(result.to_string());
|
||||
}
|
||||
|
||||
virtual Vector<Partition> format_to_parts(Value const& value) const override
|
||||
{
|
||||
auto formatted = format_impl(value);
|
||||
|
|
|
@ -156,7 +156,6 @@ public:
|
|||
using Value = Variant<double, String>;
|
||||
|
||||
virtual String format(Value const&) const = 0;
|
||||
virtual String format_to_decimal(Value const&) const = 0;
|
||||
virtual Vector<Partition> format_to_parts(Value const&) const = 0;
|
||||
|
||||
virtual String format_range(Value const&, Value const&) const = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue