Blender
V3.3
|
#include <BLI_string_ref.hh>
Public Member Functions | |
#StringRefNull Inline Methods | |
constexpr | StringRefNull () |
constexpr | StringRefNull (const char *str, int64_t size) |
StringRefNull (const char *str) | |
StringRefNull (const std::string &str) | |
constexpr char | operator[] (int64_t index) const |
constexpr const char * | c_str () 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 |
void | unsafe_copy (char *dst) const |
void | copy (char *dst, 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, 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 constexpr int64_t | not_found = -1 |
![]() | |
constexpr | StringRefBase (const char *data, int64_t size) |
![]() | |
const char * | data_ |
int64_t | size_ |
References a null-terminated const char array.
Definition at line 108 of file BLI_string_ref.hh.
|
constexpr |
Definition at line 432 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 440 of file BLI_string_ref.hh.
References BLI_assert, blender::StringRefBase::size(), and str.
|
inline |
Construct a StringRefNull from a null terminated c-string. The pointer must not point to NULL.
Definition at line 450 of file BLI_string_ref.hh.
References BLI_assert, blender::StringRefBase::data_, 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 461 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 481 of file BLI_string_ref.hh.
References blender::StringRefBase::data_.
Referenced by add_attribute_search_button(), blender::ed::asset::index::AssetEntryReader::add_tags_to_meta_data(), blender::bke::idprop::array_create(), blender::gpu::GPUSource::build(), catalog_name_ensure_unique(), blender::gpu::ShaderInterface::copy_input_name(), count_active_texture_sampler(), blender::bke::idprop::create(), blender::bke::idprop::create_array(), blender::bke::idprop::create_group(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_top_row_cell(), blender::ed::asset_browser::AssetCatalogDropController::drop_assets_into_catalog(), blender::nodes::node_shader_math_cc::get_base_multi_function(), blender::ed::asset::index::BlendFile::get_file_path(), blender::ed::asset::index::AssetEntryReader::get_idcode(), blender::nodes::node_shader_vector_math_cc::get_multi_function(), blender::bke::get_mutable_attribute(), blender::bke::get_span_attribute(), blender::bke::get_varray_attribute(), blender::gpu::GLShaderInterface::GLShaderInterface(), gpu_material_library_use_function(), GPU_shader_create_from_info(), GPU_shader_create_from_info_name(), blender::gpu::shader::gpu_shader_dependency_get_filename_from_source_string(), blender::nodes::node_shader_math_cc::gpu_shader_get_name(), initialize_group_input(), internal_dependencies_panel_draw(), blender::io::obj::linked_sockets_to_dest_id(), mesh_cd_calc_used_gpu_layers(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::NodeTreeRef::nodes_by_type(), blender::fstream::open(), outliner_draw_overrides_rna_buts(), outliner_draw_warning_tree_element(), blender::bke::OwnedAnonymousAttributeID< IsStrongReference >::OwnedAnonymousAttributeID(), blender::io::path_reference(), blender::gpu::Shader::print_log(), blender::nodes::node_fn_replace_string_cc::replace_all(), blender::nodes::search_link_ops_for_declarations(), blender::ed::spreadsheet::spreadsheet_column_assign_runtime_data(), and blender::ed::space_node::ui_node_link_items().
|
constexpr |
Get the char at the given index.
Definition at line 468 of file BLI_string_ref.hh.
References BLI_assert, blender::StringRefBase::data_, and blender::StringRefBase::size_.