mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
AK: Add String::number(size_t) overload
This commit is contained in:
parent
ae060d7450
commit
5cd04a6ad8
Notes:
sideshowbarker
2024-07-19 12:09:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5cd04a6ad83
2 changed files with 6 additions and 0 deletions
|
@ -184,6 +184,11 @@ unsigned String::to_uint(bool& ok) const
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String String::number(size_t value)
|
||||||
|
{
|
||||||
|
return String::format("%zu", value);
|
||||||
|
}
|
||||||
|
|
||||||
String String::number(unsigned value)
|
String String::number(unsigned value)
|
||||||
{
|
{
|
||||||
return String::format("%u", value);
|
return String::format("%u", value);
|
||||||
|
|
|
@ -194,6 +194,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
static String format(const char*, ...);
|
static String format(const char*, ...);
|
||||||
|
static String number(size_t);
|
||||||
static String number(unsigned);
|
static String number(unsigned);
|
||||||
static String number(int);
|
static String number(int);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue