From acab244a6342be7597d0f2d22dc90a43f425fbb8 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sat, 18 Nov 2017 13:42:45 +0100 Subject: Added functions to print a number as hex or dec string Signed-off-by: Olivier Gayot --- number.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'number.h') diff --git a/number.h b/number.h index ca5075e..e7eebb5 100644 --- a/number.h +++ b/number.h @@ -8,6 +8,16 @@ class number { public: number() = default; + /** + * \brief Return a hexadecimal string representation of this number. + */ + std::string to_hex_string() const; + + /** + * \brief Return a decimal string representation of this number. + */ + std::string to_dec_string() const; + /** * \brief Return the result of the addition of a number and this number. * -- cgit v1.2.3