![]() |
simdjson 4.2.2
Ridiculously Fast JSON
|
User-provided string that promises it has extra padded bytes at the end for use with parser::parse(). More...
#include <padded_string_view.h>
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. | |
| 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. | |
| 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. | |
| size_t | capacity () const noexcept |
| The number of allocated bytes. | |
| bool | has_sufficient_padding () const noexcept |
| check that the view has sufficient padding | |
| bool | remove_utf8_bom () noexcept |
| Remove the UTF-8 Byte Order Mark (BOM) if it exists. | |
| 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 |
overload explicit inline padded_string_view(const char* s, size_t len) noexcept
Definition at line 17 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 |
The number of allocated bytes.
Definition at line 54 of file padded_string_view-inl.h.
|
inlinenoexcept |
check that the view has sufficient padding
Definition at line 38 of file padded_string_view-inl.h.
|
inlinenoexcept |
The amount of padding on the string (capacity() - length())
Definition at line 56 of file padded_string_view-inl.h.
|
inlinenoexcept |
Remove the UTF-8 Byte Order Mark (BOM) if it exists.
Definition at line 58 of file padded_string_view-inl.h.