blob: 726ce8894663d454f00764cb0e53e4639cae1919 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#include "std/memory.hpp"
#include "std/smart_string.hpp"
/**
* Converts a double number to a string.
*
* @param num A double number
* @param width The desired double width
* @param precision The desired double precision
* @returns The double as a string.
*/
UniquePtr<SmartString> doubleToStr(double num, unsigned int width = 3,
unsigned int precision = 2);
/**
* Converts a integer to a string.
*
* @param num A number
* @returns The number as a string.
*/
UniquePtr<SmartString> intToStr(int num);
/**
* Converts a unsigned integer to a string.
*
* @param num A number
* @returns The number as a string.
*/
UniquePtr<SmartString> uintToStr(unsigned int num);
|