1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:37:46 +00:00

AK: Add a fallible StringBuilder::create() factory function

This is nice, and is also used by the Jakt runtime.
This commit is contained in:
Ali Mohammad Pur 2022-12-09 20:15:35 +03:30 committed by Ali Mohammad Pur
parent 21c2d8bd98
commit 543890c5c9
2 changed files with 9 additions and 0 deletions

View file

@ -18,6 +18,8 @@ class StringBuilder {
public:
using OutputType = DeprecatedString;
static ErrorOr<StringBuilder> create(size_t initial_capacity = inline_capacity);
explicit StringBuilder(size_t initial_capacity = inline_capacity);
~StringBuilder() = default;