mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
AK: Introduce a fallible version of StringBuilder::to_byte_buffer
Name it StringBuilder::try_to_byte_buffer accordingly :^)
This commit is contained in:
committed by
Linus Groh
parent
8b8e91d4da
commit
b4b283670d
@@ -111,6 +111,11 @@ ByteBuffer StringBuilder::to_byte_buffer() const
|
||||
return ByteBuffer::copy(data(), length()).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
ErrorOr<ByteBuffer> StringBuilder::try_to_byte_buffer() const
|
||||
{
|
||||
return TRY(ByteBuffer::copy(data(), length()));
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
DeprecatedString StringBuilder::to_deprecated_string() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user