mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-03 21:10:30 +00: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
Notes:
sideshowbarker
2024-07-17 21:04:18 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/aa1f7060afc Pull-request: https://github.com/SerenityOS/serenity/pull/11817 Reviewed-by: https://github.com/bgianfo ✅
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…
Reference in a new issue