mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Define BigInt::to_string to complement to_deprecated_string
This commit is contained in:
committed by
Linus Groh
parent
b245300ba1
commit
7a7a649f5b
Notes:
sideshowbarker
2024-07-17 00:19:45 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/7a7a649f5b Pull-request: https://github.com/SerenityOS/serenity/pull/17461 Reviewed-by: https://github.com/linusg
@@ -6,6 +6,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibCrypto/BigInt/SignedBigInteger.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
@@ -21,7 +23,9 @@ public:
|
||||
virtual ~BigInt() override = default;
|
||||
|
||||
Crypto::SignedBigInteger const& big_integer() const { return m_big_integer; }
|
||||
const DeprecatedString to_deprecated_string() const { return DeprecatedString::formatted("{}n", m_big_integer.to_base_deprecated(10)); }
|
||||
|
||||
ErrorOr<String> to_string() const;
|
||||
DeprecatedString to_deprecated_string() const { return DeprecatedString::formatted("{}n", m_big_integer.to_base_deprecated(10)); }
|
||||
|
||||
private:
|
||||
explicit BigInt(Crypto::SignedBigInteger);
|
||||
|
||||
Reference in New Issue
Block a user