simdjson
3.11.0
Ridiculously Fast JSON
|
String with extra allocation for ease of use with parser::parse() More...
Public Member Functions | |
padded_string () noexcept | |
Create a new, empty padded string. | |
padded_string (size_t length) noexcept | |
Create a new padded string buffer. More... | |
padded_string (const char *data, size_t length) noexcept | |
Create a new padded string by copying the given input. More... | |
padded_string (const std::string &str_) noexcept | |
Create a new padded string by copying the given input. More... | |
padded_string (std::string_view sv_) noexcept | |
Create a new padded string by copying the given input. More... | |
padded_string (padded_string &&o) noexcept | |
Move one padded string into another. More... | |
padded_string & | operator= (padded_string &&o) noexcept |
Move one padded string into another. More... | |
void | swap (padded_string &o) noexcept |
size_t | size () const noexcept |
The length of the string. More... | |
size_t | length () const noexcept |
The length of the string. More... | |
const char * | data () const noexcept |
The string data. | |
const uint8_t * | u8data () const noexcept |
char * | data () noexcept |
The string data. | |
operator std::string_view () const | |
Create a std::string_view with the same content. | |
operator padded_string_view () const noexcept | |
Create a padded_string_view with the same content. | |
Static Public Member Functions | |
static simdjson_result< padded_string > | load (std::string_view path) noexcept |
Load this padded string from a file. More... | |
String with extra allocation for ease of use with parser::parse()
This is a move-only class, it cannot be copied.
Definition at line 23 of file padded_string.h.
|
inlineexplicitnoexcept |
Create a new padded string buffer.
length | the size of the string. |
Definition at line 48 of file padded_string-inl.h.
|
inlineexplicitnoexcept |
Create a new padded string by copying the given input.
data | the buffer to copy |
length | the number of bytes to copy |
Definition at line 51 of file padded_string-inl.h.
|
inlinenoexcept |
Create a new padded string by copying the given input.
str_ | the string to copy |
Definition at line 72 of file padded_string-inl.h.
|
inlinenoexcept |
Create a new padded string by copying the given input.
sv_ | the string to copy |
Definition at line 81 of file padded_string-inl.h.
|
inlinenoexcept |
Move one padded string into another.
The original padded string will be reduced to zero capacity.
o | the string to move. |
Definition at line 92 of file padded_string-inl.h.
|
inlinenoexcept |
The length of the string.
Does not include padding.
Definition at line 122 of file padded_string-inl.h.
|
inlinestaticnoexcept |
Load this padded string from a file.
Windows users who need to read files with non-ANSI characters in the name should set their code page to UTF-8 (65001) before calling this function. This should be the default with Windows 11 and better. Further, they may use the AreFileApisANSI function to determine whether the filename is interpreted using the ANSI or the system default OEM codepage, and they may call SetFileApisToOEM accordingly.
path | the path to the file. |
Definition at line 134 of file padded_string-inl.h.
|
inlinenoexcept |
Move one padded string into another.
The original padded string will be reduced to zero capacity.
o | the string to move. |
Definition at line 98 of file padded_string-inl.h.
|
inlinenoexcept |
The length of the string.
Does not include padding.
Definition at line 120 of file padded_string-inl.h.