MCPcopy Create free account
hub / github.com/LadybirdBrowser/ladybird / push

Method push

Libraries/LibWeb/Encoding/TextDecoderCommon.cpp:12–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace Web::Encoding {
11
12ErrorOr<void> TextDecoderOutputQueue::push(String output)
13{
14 if (output.is_empty())
15 return {};
16
17 if (m_has_builder)
18 return m_builder.try_append(output.bytes_as_string_view());
19
20 if (!m_single_output.has_value()) {
21 m_single_output = move(output);
22 return {};
23 }
24
25 m_has_builder = true;
26 TRY(m_builder.try_append(m_single_output->bytes_as_string_view()));
27 m_single_output.clear();
28 return m_builder.try_append(output.bytes_as_string_view());
29}
30
31ErrorOr<Utf16String> TextDecoderOutputQueue::serialize()
32{

Callers 15

pFunction · 0.80
qFunction · 0.80
sourceKeyFunction · 0.80
toStringFunction · 0.80
targetKeyFunction · 0.80
bFunction · 0.80
appendFunction · 0.80

Calls 5

is_emptyMethod · 0.45
try_appendMethod · 0.45
bytes_as_string_viewMethod · 0.45
has_valueMethod · 0.45
clearMethod · 0.45