49 #include <string_view>
91 constexpr
const char *
data()
const
105 operator std::string()
const
107 return std::string(
data_,
static_cast<size_t>(
size_));
110 constexpr
operator std::string_view()
const
112 return std::string_view(
data_,
static_cast<size_t>(
size_));
120 constexpr
const char *
end()
const
137 memcpy(dst,
data_,
static_cast<size_t>(
size_));
147 if (
size_ < dst_size) {
160 template<
size_t N>
void copy(
char (&dst)[
N])
const
189 constexpr
const char &
back()
const
352 const int64_t new_size = std::max<int64_t>(0,
size_ - n);
372 stream << std::string(ref);
378 stream << std::string(ref.
data(), (
size_t)ref.
size());
388 return std::string(
a) + std::string(b);
397 if (
a.size() != b.
size()) {
410 return std::string_view(
a) < std::string_view(b);
415 return std::string_view(
a) > std::string_view(b);
420 return std::string_view(
a) <= std::string_view(b);
425 return std::string_view(
a) >= std::string_view(b);
477 if (index == std::string_view::npos) {
480 return static_cast<int64_t>(index);
499 std::string_view(*this).find_first_of(chars,
static_cast<size_t>(
pos)));
511 std::string_view(*this).find_last_of(chars,
static_cast<size_t>(
pos)));
523 std::string_view(*this).find_first_not_of(chars,
static_cast<size_t>(
pos)));
535 std::string_view(*this).find_last_not_of(chars,
static_cast<size_t>(
pos)));
#define STREQLEN(a, b, n)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
void unsafe_copy(char *dst) const
constexpr const char * data() const
static constexpr int64_t not_found
constexpr int64_t rfind(char c, int64_t pos=INT64_MAX) const
constexpr const char & front() const
constexpr int64_t find_last_of(StringRef chars, int64_t pos=INT64_MAX) const
constexpr int64_t find(char c, int64_t pos=0) const
constexpr const char & back() const
constexpr int64_t find_last_not_of(StringRef chars, int64_t pos=INT64_MAX) const
constexpr int64_t find_first_not_of(StringRef chars, int64_t pos=0) const
void copy(char(&dst)[N]) const
constexpr bool is_empty() const
constexpr const char * end() const
constexpr int64_t rfind(StringRef str, int64_t pos=INT64_MAX) const
constexpr const char * begin() const
constexpr bool startswith(StringRef prefix) const
constexpr StringRef substr(int64_t start, const int64_t size) const
constexpr StringRefBase(const char *data, const int64_t size)
constexpr bool endswith(StringRef suffix) const
constexpr int64_t find_first_of(StringRef chars, int64_t pos=0) const
constexpr IndexRange index_range() const
constexpr int64_t size() const
void copy(char *dst, const int64_t dst_size) const
StringRefNull(const char *str)
StringRefNull(const std::string &str)
constexpr char operator[](const int64_t index) const
constexpr StringRefNull(const char *str, const int64_t size)
constexpr StringRefNull()
constexpr const char * c_str() const
constexpr StringRef(const char *str, const int64_t length)
constexpr char operator[](int64_t index) const
constexpr StringRef(const char *begin, const char *one_after_end)
constexpr StringRef(std::string_view view)
constexpr StringRef drop_suffix(const int64_t n) const
constexpr StringRef drop_known_prefix(StringRef prefix) const
constexpr StringRef(StringRefNull other)
StringRef(const std::string &str)
constexpr StringRef(const char *str)
constexpr StringRef drop_prefix(const int64_t n) const
constexpr bool operator!=(StringRef a, StringRef b)
constexpr int64_t index_or_npos_to_int64(size_t index)
constexpr bool operator==(StringRef a, StringRef b)
std::ostream & operator<<(std::ostream &stream, StringRef ref)
constexpr bool operator>=(StringRef a, StringRef b)
constexpr bool operator<(StringRef a, StringRef b)
constexpr bool operator<=(StringRef a, StringRef b)
constexpr bool operator>(StringRef a, StringRef b)
std::string operator+(StringRef a, StringRef b)