mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
LibJS: Define number_to_string to convert a double to a String
This commit is contained in:
parent
8a88d4434f
commit
0b58748156
2 changed files with 54 additions and 33 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <AK/Forward.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/Result.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
|
@ -566,6 +567,7 @@ enum class NumberToStringMode {
|
|||
WithExponent,
|
||||
WithoutExponent,
|
||||
};
|
||||
ThrowCompletionOr<String> number_to_string(VM& vm, double, NumberToStringMode = NumberToStringMode::WithExponent);
|
||||
DeprecatedString number_to_deprecated_string(double, NumberToStringMode = NumberToStringMode::WithExponent);
|
||||
Optional<Value> string_to_number(StringView);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue