simdjson
3.11.0
Ridiculously Fast JSON
|
User-provided string that promises it has extra padded bytes at the end for use with parser::parse(). More...
Public Member Functions | |
padded_string_view () noexcept=default | |
Create an empty padded_string_view. | |
padded_string_view (const char *s, size_t len, size_t capacity) noexcept | |
Promise the given buffer has at least SIMDJSON_PADDING extra bytes allocated to it. More... | |
padded_string_view (const uint8_t *s, size_t len, size_t capacity) noexcept | |
overload explicit inline padded_string_view(const char* s, size_t len) noexcept | |
padded_string_view (const std::string &s) noexcept | |
Promise the given string has at least SIMDJSON_PADDING extra bytes allocated to it. More... | |
padded_string_view (std::string_view s, size_t capacity) noexcept | |
Promise the given string_view has at least SIMDJSON_PADDING extra bytes allocated to it. More... | |
size_t | capacity () const noexcept |
The number of allocated bytes. | |
bool | remove_utf8_bom () noexcept |
Remove the UTF-8 Byte Order Mark (BOM) if it exists. More... | |
size_t | padding () const noexcept |
The amount of padding on the string (capacity() - length()) | |
User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
Definition at line 18 of file padded_string_view.h.
|
inlineexplicitnoexcept |
Promise the given buffer has at least SIMDJSON_PADDING extra bytes allocated to it.
s | The string. |
len | The length of the string (not including padding). |
capacity | The allocated length of the string, including padding. If the capacity is less than the length, the capacity will be set to the length. |
Definition at line 11 of file padded_string_view-inl.h.
|
inlineexplicitnoexcept |
Promise the given string has at least SIMDJSON_PADDING extra bytes allocated to it.
The capacity of the string will be used to determine its padding.
s | The string. |
Definition at line 27 of file padded_string_view-inl.h.
|
inlineexplicitnoexcept |
Promise the given string_view has at least SIMDJSON_PADDING extra bytes allocated to it.
s | The string. |
capacity | The allocated length of the string, including padding. If the capacity is less than the length, the capacity will be set to the length. |
Definition at line 32 of file padded_string_view-inl.h.
|
inlinenoexcept |
Remove the UTF-8 Byte Order Mark (BOM) if it exists.
Definition at line 42 of file padded_string_view-inl.h.