mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
LibJS: Make PluralRules use the new double parser
This commit is contained in:
parent
7db59124e8
commit
d66bfcc3f4
1 changed files with 1 additions and 3 deletions
|
@ -21,9 +21,7 @@ PluralRules::PluralRules(Object& prototype)
|
|||
::Locale::PluralOperands get_operands(String const& string)
|
||||
{
|
||||
// 1.Let n be ! ToNumber(s).
|
||||
char* end { nullptr };
|
||||
auto number = strtod(string.characters(), &end);
|
||||
VERIFY(!*end);
|
||||
auto number = string.to_double(AK::TrimWhitespace::Yes).release_value();
|
||||
|
||||
// 2. Assert: n is finite.
|
||||
VERIFY(isfinite(number));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue