35 #include <string_view>
61 constexpr
const char *
data()
const;
64 operator std::string()
const;
65 constexpr
operator std::string_view()
const;
67 constexpr
const char *
begin()
const;
68 constexpr
const char *
end()
const;
74 template<
size_t N>
void copy(
char (&dst)[
N])
const;
80 constexpr
const char &
front()
const;
81 constexpr
const char &
back()
const;
117 constexpr
const char *
c_str()
const;
129 constexpr
StringRef(
const char *
begin,
const char *one_after_end);
179 inline StringRefBase::operator std::string()
const
181 return std::string(
data_,
static_cast<size_t>(size_));
184 constexpr StringRefBase::operator std::string_view()
const
186 return std::string_view(
data_,
static_cast<size_t>(size_));
212 memcpy(dst,
data_,
static_cast<size_t>(
size_));
223 if (
size_ < dst_size) {
308 if (index == std::string_view::npos) {
311 return static_cast<int64_t>(index);
342 std::string_view(*this).find_first_of(chars,
static_cast<size_t>(
pos)));
349 std::string_view(*this).find_first_of(
c,
static_cast<size_t>(
pos)));
356 std::string_view(*this).find_last_of(chars,
static_cast<size_t>(
pos)));
369 std::string_view(*this).find_first_not_of(chars,
static_cast<size_t>(
pos)));
376 std::string_view(*this).find_first_not_of(
c,
static_cast<size_t>(
pos)));
383 std::string_view(*this).find_last_not_of(chars,
static_cast<size_t>(
pos)));
390 std::string_view(*this).find_last_not_of(
c,
static_cast<size_t>(
pos)));
395 return this->
trim(
" \t\r\n");
421 "forward search found characters-to-not-remove, but backward search did not");
422 const int64_t substr_len = find_end - find_front + 1;
423 return this->
substr(find_front, substr_len);
544 const int64_t new_size = std::max<int64_t>(0,
size_ - n);
590 stream << std::string(ref);
596 stream << std::string(ref.
data(), (
size_t)ref.
size());
606 return std::string(
a) + std::string(
b);
615 if (
a.size() !=
b.size()) {
618 if (
a.data() ==
b.data()) {
622 return STREQLEN(
a.data(),
b.data(), (
size_t)
a.size());
632 return std::string_view(
a) < std::string_view(
b);
637 return std::string_view(
a) > std::string_view(
b);
642 return std::string_view(
a) <= std::string_view(
b);
647 return std::string_view(
a) >= std::string_view(
b);
#define BLI_assert_msg(a, msg)
#define STREQLEN(a, b, n)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
constexpr const char & front() const
void unsafe_copy(char *dst) const
static constexpr int64_t not_found
constexpr int64_t rfind(char c, int64_t pos=INT64_MAX) const
constexpr int64_t find_last_of(StringRef chars, int64_t pos=INT64_MAX) const
void copy(char *dst, int64_t dst_size) const
constexpr int64_t find(char c, int64_t pos=0) const
constexpr const char * begin() const
constexpr const char * end() 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
constexpr bool is_empty() const
constexpr StringRef substr(int64_t start, int64_t size) const
constexpr StringRefBase(const char *data, int64_t size)
constexpr bool startswith(StringRef prefix) const
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
constexpr StringRef trim() const
constexpr const char * data() const
constexpr const char & back() const
constexpr const char * c_str() const
constexpr StringRefNull()
constexpr char operator[](int64_t index) const
constexpr StringRef drop_prefix(int64_t n) const
constexpr StringRef drop_suffix(int64_t n) const
constexpr char operator[](int64_t index) const
constexpr StringRef drop_known_prefix(StringRef prefix) const
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
T length(const vec_base< T, Size > &a)
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, const eAlpha &space)
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)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)