|
Blender
V2.93
|
#include <BLI_string_ref.hh>
Inherits blender::StringRefBase.
Public Member Functions | |
| constexpr | StringRefNull () |
| StringRefNull (const char *str) | |
| constexpr | StringRefNull (const char *str, const int64_t size) |
| StringRefNull (const std::string &str) | |
| constexpr char | operator[] (const int64_t index) const |
| constexpr const char * | c_str () const |
Public Member Functions inherited from blender::StringRefBase | |
| 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 |
| void | unsafe_copy (char *dst) const |
| void | copy (char *dst, const int64_t dst_size) const |
| template<size_t N> | |
| void | copy (char(&dst)[N]) const |
| constexpr bool | startswith (StringRef prefix) const |
| constexpr bool | endswith (StringRef suffix) const |
| constexpr StringRef | substr (int64_t start, const 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 |
Additional Inherited Members | |
Static Public Attributes inherited from blender::StringRefBase | |
| static constexpr int64_t | not_found = -1 |
Protected Member Functions inherited from blender::StringRefBase | |
| constexpr | StringRefBase (const char *data, const int64_t size) |
Protected Attributes inherited from blender::StringRefBase | |
| const char * | data_ |
| int64_t | size_ |
References a null-terminated const char array.
Definition at line 216 of file BLI_string_ref.hh.
|
inlineconstexpr |
Definition at line 219 of file BLI_string_ref.hh.
|
inline |
Construct a StringRefNull from a null terminated c-string. The pointer must not point to NULL.
Definition at line 227 of file BLI_string_ref.hh.
References BLI_assert, blender::StringRefBase::data_, blender::StringRefBase::size_, and str.
|
inlineconstexpr |
Construct a StringRefNull from a null terminated c-string. This invokes undefined behavior when the given size is not the correct size of the string.
Definition at line 237 of file BLI_string_ref.hh.
References BLI_assert, blender::StringRefBase::size(), and str.
|
inline |
Reference a std::string. Remember that when the std::string is destructed, the StringRefNull will point to uninitialized memory.
Definition at line 246 of file BLI_string_ref.hh.
|
inlineconstexpr |
Returns the beginning of a null-terminated char array.
This is like ->data(), but can only be called on a StringRefNull.
Definition at line 266 of file BLI_string_ref.hh.
References blender::StringRefBase::data_.
Referenced by blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_top_row_cell(), blender::ed::spreadsheet::GeometryDataSource::foreach_default_column_ids(), gpu_shader_get_name(), blender::nodes::NodeTreeRef::nodes_by_type(), and OutputAttributePtr::save().
|
inlineconstexpr |
Get the char at the given index.
Definition at line 253 of file BLI_string_ref.hh.
References BLI_assert, blender::StringRefBase::data_, and blender::StringRefBase::size_.