 |
simdjson
0.3.1
Ridiculously Fast JSON
|
1 #ifndef SIMDJSON_PADDED_STRING_H
2 #define SIMDJSON_PADDED_STRING_H
3 #include "simdjson/portability.h"
4 #include "simdjson/common_defs.h"
5 #include "simdjson/error.h"
73 size_t size()
const noexcept;
80 size_t length()
const noexcept;
85 const char *
data()
const noexcept;
90 char *
data() noexcept;
95 operator std::string_view()
const;
109 char *data_ptr{
nullptr};
120 namespace simdjson::internal {
126 inline char *allocate_padded_buffer(
size_t length) noexcept;
130 #endif // SIMDJSON_PADDED_STRING_H
const char * data() const noexcept
The string data.
size_t length() const noexcept
The length of the string.
padded_string & operator=(padded_string &&o) noexcept
Move one padded string into another.
static simdjson_result< padded_string > load(const std::string &path) noexcept
Load this padded string from a file.
The result of a simdjson operation that could fail.
size_t size() const noexcept
The length of the string.
padded_string() noexcept
Create a new, empty padded string.
String with extra allocation for ease of use with parser::parse()