![]() |
simdjson 4.3.1
Ridiculously Fast JSON
|
Builder for constructing padded_string incrementally. More...
#include <padded_string.h>
Public Member Functions | |
| padded_string_builder () noexcept | |
| Create a new, empty padded string builder. | |
| padded_string_builder (size_t capacity) noexcept | |
| Create a new padded string builder with initial capacity. | |
| padded_string_builder (padded_string_builder &&o) noexcept | |
| Move constructor. | |
| padded_string_builder & | operator= (padded_string_builder &&o) noexcept |
| Move assignment. | |
| padded_string_builder (const padded_string_builder &)=delete | |
| Copy constructor (deleted). | |
| padded_string_builder & | operator= (const padded_string_builder &)=delete |
| Copy assignment (deleted). | |
| ~padded_string_builder () noexcept | |
| Destructor. | |
| bool | append (const char *newdata, size_t length) noexcept |
| Append data to the builder. | |
| bool | append (std::string_view sv) noexcept |
| Append a string view to the builder. | |
| size_t | length () const noexcept |
| Get the current length of the built string. | |
| padded_string | build () const noexcept |
| Build a padded_string from the current content. | |
| padded_string | convert () noexcept |
| Convert the current content into a padded_string. | |
Builder for constructing padded_string incrementally.
This class allows efficient appending of data and then building a padded_string.
Definition at line 168 of file padded_string.h.
|
inlinenoexcept |
Create a new padded string builder with initial capacity.
| capacity | the initial capacity of the builder. |
Definition at line 276 of file padded_string-inl.h.
|
inlinenoexcept |
Move constructor.
Definition at line 285 of file padded_string-inl.h.
|
inlinenoexcept |
Destructor.
Definition at line 305 of file padded_string-inl.h.
|
inlinenoexcept |
Append data to the builder.
| newdata | the buffer to append |
| length | the number of bytes to append |
Definition at line 309 of file padded_string-inl.h.
|
inlinenoexcept |
Append a string view to the builder.
| sv | the string view to append |
Definition at line 321 of file padded_string-inl.h.
|
inlinenoexcept |
Build a padded_string from the current content.
The builder's content is not modified. If you want to avoid the copy, use convert() instead.
Definition at line 329 of file padded_string-inl.h.
|
inlinenoexcept |
Convert the current content into a padded_string.
The builder's content is emptied, the capacity is lost.
Definition at line 333 of file padded_string-inl.h.
|
inlinenoexcept |
Get the current length of the built string.
Definition at line 325 of file padded_string-inl.h.
|
inlinenoexcept |
Move assignment.
Definition at line 292 of file padded_string-inl.h.