AK: Add String::number(size_t) overload

This commit is contained in:
Andreas Kling 2019-09-11 18:58:33 +02:00
parent ae060d7450
commit 5cd04a6ad8
Notes: sideshowbarker 2024-07-19 12:09:45 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -184,6 +184,11 @@ unsigned String::to_uint(bool& ok) const
return value;
}
String String::number(size_t value)
{
return String::format("%zu", value);
}
String String::number(unsigned value)
{
return String::format("%u", value);

View file

@ -194,6 +194,7 @@ public:
}
static String format(const char*, ...);
static String number(size_t);
static String number(unsigned);
static String number(int);