|
Blender V5.0
|
#include <BLI_string_ref.hh>
Inherits blender::StringRefBase.
Inherited by blender::gpu::shader::ShaderCreateInfo::ResourceString.
Public Member Functions | |
| StringRefNull (std::nullptr_t)=delete | |
#StringRefNull Inline Methods | |
| constexpr | StringRefNull () |
| constexpr | StringRefNull (const char *str, int64_t size) |
| constexpr | StringRefNull (const char *str) |
| StringRefNull (const std::string &str) | |
| constexpr char | operator[] (int64_t index) const |
| constexpr const char * | c_str () const |
| Public Member Functions inherited from 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 |
Additional Inherited Members | |
| Static Public Attributes inherited from blender::StringRefBase | |
| static constexpr int64_t | not_found = -1 |
| constexpr | StringRefBase (const char *data, int64_t size) |
| Protected Attributes inherited from blender::StringRefBase | |
| const char * | data_ |
| int64_t | size_ |
References a null-terminated const char array.
StringRefNull can be compared with StringRef and StringRefNull.
Definition at line 132 of file BLI_string_ref.hh.
|
constexpr |
Definition at line 435 of file BLI_string_ref.hh.
|
constexpr |
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 441 of file BLI_string_ref.hh.
|
delete |
|
constexpr |
Construct a StringRefNull from a null terminated c-string. The pointer must not point to NULL.
Definition at line 451 of file BLI_string_ref.hh.
|
inline |
Reference a std::string. Remember that when the std::string is destructed, the StringRefNull will point to uninitialized memory.
Definition at line 462 of file BLI_string_ref.hh.
|
constexpr |
Returns the beginning of a null-terminated char array.
This is like ->data(), but can only be called on a StringRefNull.
Definition at line 483 of file BLI_string_ref.hh.
Referenced by blender::gpu::GLShaderInterface::GLShaderInterface(), and blender::eevee::ShaderModule::material_create_info_amend().
|
constexpr |
Get the char at the given index.
Definition at line 470 of file BLI_string_ref.hh.