Add a to_string overload for unsigned int

This commit is contained in:
Maxime Coste 2016-08-27 10:46:49 +01:00
parent ba7df73b15
commit 2bf100bdd0
2 changed files with 8 additions and 0 deletions

View File

@ -307,6 +307,13 @@ InplaceString<15> to_string(int val)
return res;
}
InplaceString<15> to_string(unsigned val)
{
InplaceString<15> res;
res.m_length = sprintf(res.m_data, "%u", val);
return res;
}
InplaceString<23> to_string(long int val)
{
InplaceString<23> res;

View File

@ -327,6 +327,7 @@ inline Hex hex(size_t val) { return {val}; }
InplaceString<15> to_string(int val);
InplaceString<23> to_string(long int val);
InplaceString<15> to_string(unsigned val);
InplaceString<23> to_string(size_t val);
InplaceString<23> to_string(Hex val);
InplaceString<23> to_string(float val);