|
Blender V5.3
|
#include <bmesh_polygon.hh>
Inherits blender::blender::StringRefBase.
Public Member Functions | |
#StringRef Inline Methods | |
| constexpr | StringRef () |
| constexpr | StringRef (StringRefNull other) |
| constexpr | StringRef (const char *str) |
| constexpr | StringRef (const char *str, int64_t length) |
| constexpr | StringRef (const char *begin, const char *one_after_end) |
| constexpr | StringRef (std::string_view view) |
| constexpr | StringRef (Span< char > span) |
| StringRef (const std::string &str) | |
| constexpr StringRef | drop_prefix (int64_t n) const |
| constexpr StringRef | drop_known_prefix (StringRef prefix) const |
| constexpr StringRef | drop_suffix (int64_t n) const |
| constexpr StringRef | drop_known_suffix (StringRef suffix) const |
| constexpr char | operator[] (int64_t index) const |
| Public Member Functions inherited from blender::blender::StringRefBase | |
| void | copy_utf8_truncated (char *dst, int64_t dst_size) const |
| void | copy_bytes_truncated (char *dst, int64_t dst_size) const |
| constexpr int64_t | size () const |
| constexpr bool | is_empty () const |
| constexpr const char * | data () const |
| constexpr | operator Span< char > () const |
| operator std::string () const | |
| constexpr | operator std::string_view () const |
| constexpr const char * | begin () const |
| constexpr const char * | end () const |
| constexpr IndexRange | index_range () const |
| template<size_t N> | |
| void | copy_utf8_truncated (char(&dst)[N]) const |
| template<size_t N> | |
| void | copy_bytes_truncated (char(&dst)[N]) const |
| void | copy_unsafe (char *dst) const |
| constexpr bool | startswith (StringRef prefix) const |
| constexpr bool | endswith (StringRef suffix) const |
| constexpr StringRef | substr (int64_t start, int64_t size) const |
| constexpr const char & | front () const |
| constexpr const char & | back () const |
| constexpr int64_t | find (char c, int64_t pos=0) const |
| constexpr int64_t | find (StringRef str, int64_t pos=0) const |
| constexpr int64_t | rfind (char c, int64_t pos=INT64_MAX) const |
| constexpr int64_t | rfind (StringRef str, int64_t pos=INT64_MAX) const |
| constexpr int64_t | find_first_of (StringRef chars, int64_t pos=0) const |
| constexpr int64_t | find_first_of (char c, int64_t pos=0) const |
| constexpr int64_t | find_last_of (StringRef chars, int64_t pos=INT64_MAX) const |
| constexpr int64_t | find_last_of (char c, int64_t pos=INT64_MAX) const |
| constexpr int64_t | find_first_not_of (StringRef chars, int64_t pos=0) const |
| constexpr int64_t | find_first_not_of (char c, int64_t pos=0) const |
| constexpr int64_t | find_last_not_of (StringRef chars, int64_t pos=INT64_MAX) const |
| constexpr int64_t | find_last_not_of (char c, int64_t pos=INT64_MAX) const |
| constexpr StringRef | trim () const |
| constexpr StringRef | trim (StringRef characters_to_remove) const |
| constexpr StringRef | trim (char character_to_remove) const |
| constexpr StringRef | trim_left () const |
| constexpr StringRef | trim_left (StringRef characters_to_remove) const |
| constexpr StringRef | trim_right () const |
| constexpr StringRef | trim_right (StringRef characters_to_remove) const |
Additional Inherited Members | |
| Public Types inherited from blender::blender::StringRefBase | |
| using | value_type = char |
| Static Public Attributes inherited from blender::blender::StringRefBase | |
| static constexpr int64_t | not_found = -1 |
| constexpr | StringRefBase (const char *data, int64_t size) |
| Protected Attributes inherited from blender::blender::StringRefBase | |
| const char * | data_ |
| int64_t | size_ |
References a const char array. It might not be null terminated.
StringRef can be compared with StringRef and StringRefNull.
Definition at line 165 of file bmesh_polygon.hh.
|
constexpr |
Definition at line 555 of file BLI_string_ref.hh.
References blender::nullptr, and blender::blender::StringRefBase::StringRefBase().
Referenced by drop_known_prefix(), drop_known_suffix(), drop_prefix(), and drop_suffix().
|
constexpr |
StringRefNull can be converted into StringRef, but not the other way around.
Definition at line 560 of file BLI_string_ref.hh.
References blender::blender::StringRefBase::data(), blender::blender::StringRefBase::size(), and blender::blender::StringRefBase::StringRefBase().
|
constexpr |
Create a StringRef from a null-terminated c-string.
Definition at line 565 of file BLI_string_ref.hh.
References length(), str, and blender::blender::StringRefBase::StringRefBase().
|
constexpr |
Definition at line 570 of file BLI_string_ref.hh.
References length(), str, and blender::blender::StringRefBase::StringRefBase().
|
constexpr |
Create a StringRef from a start and end pointer. This invokes undefined behavior when the second point points to a smaller address than the first one.
Definition at line 631 of file BLI_string_ref.hh.
References blender::blender::StringRefBase::begin(), blender::BLI_assert(), and blender::blender::StringRefBase::StringRefBase().
|
constexpr |
Definition at line 646 of file BLI_string_ref.hh.
References blender::blender::StringRefBase::data(), blender::blender::StringRefBase::size(), and blender::blender::StringRefBase::StringRefBase().
|
constexpr |
Definition at line 651 of file BLI_string_ref.hh.
References blender::blender::StringRefBase::data(), blender::blender::StringRefBase::size(), and blender::blender::StringRefBase::StringRefBase().
|
inline |
Reference a std::string. Remember that when the std::string is destructed, the StringRef will point to uninitialized memory.
Definition at line 641 of file BLI_string_ref.hh.
References blender::blender::StringRefBase::data(), blender::blender::StringRefBase::size(), str, and blender::blender::StringRefBase::StringRefBase().
Return a new StringRef with the given prefix being skipped. This invokes undefined behavior if the string does not begin with the given prefix.
Definition at line 590 of file BLI_string_ref.hh.
References blender::BLI_assert(), drop_prefix(), blender::blender::StringRefBase::size(), blender::blender::StringRefBase::startswith(), and StringRef().
Return a new StringRef with the given suffix being skipped. This invokes undefined behavior if the string does not begin with the given suffix.
Definition at line 611 of file BLI_string_ref.hh.
References blender::BLI_assert(), drop_suffix(), blender::blender::StringRefBase::endswith(), blender::blender::StringRefBase::size(), and StringRef().
Returns a new StringRef that does not contain the first n chars. This invokes undefined behavior when n is negative.
Definition at line 578 of file BLI_string_ref.hh.
References blender::BLI_assert(), blender::blender::StringRefBase::data_, blender::blender::StringRefBase::size_, StringRef(), and blender::StringRef::StringRef().
Referenced by drop_known_prefix().
Return a new StringRef that does not contain the last n chars. This invokes undefined behavior when n is negative.
Definition at line 600 of file BLI_string_ref.hh.
References blender::BLI_assert(), blender::blender::StringRefBase::data_, blender::blender::StringRefBase::size_, StringRef(), and blender::StringRef::StringRef().
Referenced by drop_known_suffix().
|
constexpr |
Get the char at the given index.
Definition at line 620 of file BLI_string_ref.hh.
References blender::BLI_assert(), blender::blender::StringRefBase::data_, and blender::blender::StringRefBase::size_.