1#ifndef SIMDJSON_PADDED_STRING_VIEW_H
2#define SIMDJSON_PADDED_STRING_VIEW_H
4#include "simdjson/portability.h"
5#include "simdjson/base.h"
6#include "simdjson/error.h"
59 inline size_t capacity() const noexcept;
72 inline
size_t padding() const noexcept;
76#if SIMDJSON_EXCEPTIONS
User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
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())
size_t capacity() const noexcept
The number of allocated bytes.
padded_string_view() noexcept=default
Create an empty padded_string_view.
bool has_sufficient_padding() const noexcept
check that the view has sufficient padding
The top level simdjson namespace, containing everything the library provides.
padded_string_view pad_with_reserve(std::string &s) noexcept
Create a padded_string_view from a string.
padded_string_view pad(std::string &s) noexcept
Create a padded_string_view from a string.
The result of a simdjson operation that could fail.