56 const std::string& str) noexcept
65 const char* str) noexcept
73 [[nodiscard]]
constexpr auto data() const noexcept -> const
char* {
82 [[nodiscard]]
constexpr auto size() const noexcept ->
std::
size_t {
92 [[nodiscard]]
constexpr auto empty() const noexcept ->
bool {
102 [[nodiscard]]
auto at(std::size_t index)
const ->
char {
103 if (index >= size_) {
118 "Invalid arguments in StringView::substr.");
Class of exceptions in this library.
auto substr(std::size_t pos) const -> StringView
Get a part of the string.
auto at(std::size_t index) const -> char
Get a character in the string.
constexpr auto data() const noexcept -> const char *
Get the pointer to the string.
StringView(const char *str) noexcept
Constructor of implicit conversion from raw string literals.
constexpr StringView() noexcept
Constructor of an empty string.
constexpr auto size() const noexcept -> std::size_t
Get the size of the string.
constexpr auto empty() const noexcept -> bool
Check whether this string is empty.
StringView(const std::string &str) noexcept
Constructor of implicit conversion from std::string objects.
constexpr StringView(const char *data, std::size_t size) noexcept
Constructor.
Namespace of utility functions and classes.
Namespace of stat_bench source codes.
Definition of StatBenchException class.