mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Kernel: Add an error propagating KString::number() API
This is simply a thin wrapper around the already existing KString::formatted() API.
This commit is contained in:
parent
809870d519
commit
aa1f7060af
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,11 @@ public:
|
|||
return vformatted(fmtstr.view(), variadic_format_parameters);
|
||||
}
|
||||
|
||||
[[nodiscard]] static ErrorOr<NonnullOwnPtr<KString>> number(Arithmetic auto value)
|
||||
{
|
||||
return formatted("{}", value);
|
||||
}
|
||||
|
||||
void operator delete(void*);
|
||||
|
||||
ErrorOr<NonnullOwnPtr<KString>> try_clone() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue