28 #ifndef HERMES_COMMON_STR_VIEW_H
29 #define HERMES_COMMON_STR_VIEW_H
31 #include <hermes/common/result.h>
78 [[nodiscard]]
size_t size()
const;
93 const char *str_{
nullptr};
Definition: str_view.h:38
static Result< ConstStrView > from(const std::string &str, size_t pos=0, i64 len=-1)
Constructs a sub-string view from a std::string object.
Definition: str_view.cpp:33
bool operator==(const std::string &s) const
Checks if this sub-string with the string s are equal.
Definition: str_view.cpp:63
size_t size() const
Gets the size of the view.
Definition: str_view.cpp:59
Holds a valid object or an error.
Definition: result.h:56
int64_t i64
64 bit size integer type
Definition: defs.h:84