|
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.
References blender::StringRefBase::StringRefBase().
Referenced by blender::gpu::shader::ShaderCreateInfo::ResourceString::ResourceString(), blender::gpu::shader::ShaderCreateInfo::ResourceString::ResourceString(), blender::gpu::shader::ShaderCreateInfo::ResourceString::ResourceString(), blender::gpu::shader::ShaderCreateInfo::ResourceString::ResourceString(), blender::gpu::shader::ShaderCreateInfo::ResourceString::ResourceString(), and StringRefNull().
|
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.
References BLI_assert, blender::StringRefBase::size(), str, and blender::StringRefBase::StringRefBase().
|
delete |
References str.
|
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.
References BLI_assert, blender::StringRefBase::data_, length(), blender::StringRefBase::size_, str, and blender::StringRefBase::StringRefBase().
|
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.
References c_str(), blender::StringRefBase::size(), str, and StringRefNull().
|
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.
References blender::StringRefBase::data_.
Referenced by acf_action_slot_name(), blender::animrig::action_fcurve_ensure_legacy(), blender::animrig::legacy::action_fcurves_remove(), blender::nodes::add_attribute_search_button(), blender::nodes::add_attribute_search_or_value_buttons(), blender::bke::path_templates::VariableMap::add_filename_only(), blender::bke::path_templates::VariableMap::add_path_up_to_file(), blender::animrig::apply_evaluation_result(), AS_asset_library_find_suitable_root_path_from_path(), blender::bke::asset_write_in_library(), blender::bke::attribute_storage_blend_write_prepare(), blender::ed::object::bake_simulation::bake_directory_has_data(), blender::gpu::MTLShader::bake_pipeline_state(), BKE_nlastrip_validate_name(), BKE_packedfile_blend_read(), blender::bUUID::bUUID(), calculate_selection_fcurve_bounds(), blender::gpu::debug::check_gl_resources(), colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_imbuf_make_linear(), colormanage_load_config(), colormanage_role_color_space_name_get(), compare_asset_catalog(), blender::gpu::ShaderCompiler::compile(), blender::bke::id_hash::compute_file_hash_with_memory_map(), blender::nodes::node_composite_file_output_cc::compute_image_path(), blender::bke::idprop::create(), blender::ed::asset::shelf::create_asset_operator_params(), blender::bke::bake::directory_is_empty(), display_buffer_apply_threaded(), blender::nodes::draw_interface_panel_as_panel(), blender::nodes::draw_property_for_socket(), blender::ed::asset_browser::AssetCatalogDropTarget::drop_assets_into_catalog(), blender::animrig::Layer::duplicate_with_shallow_strip_copies(), ed_armature_bone_unique_name(), ED_image_filesel_detect_sequences(), DRWContext::engines_draw_scene(), blender::nodes::GeoNodeExecParams::ensure_absolute_path(), blender::animrig::tests::ActionFCurveMoveTest::fcurve_create(), blender::animrig::fcurve_find_in_action(), blender::animrig::fcurve_find_in_action_slot(), blender::animrig::fcurve_matches_collection_path(), fileentry_uiname(), filelist_readjob_all_asset_library(), blender::bke::bake::find_sorted_meta_files(), blender::ed::animation::flip_names(), foreach_libblock_remap_callback(), blender::bke::bake::BakePath::from_single_root(), blender::asset_system::AssetLibraryService::get_asset_library_on_disk(), blender::nodes::get_base_multi_function(), blender::bke::bake::get_blend_file_name(), blender::bke::bake::get_data_type_from_io_name(), blender::bke::bake::get_domain_from_io_name(), blender::memory_cache::get_file_modification_time(), get_input_socket(), blender::ed::asset::get_local_asset_from_relative_identifier(), blender::nodes::node_shader_vector_math_cc::get_multi_function(), blender::bke::id_hash::get_source_file_hash(), gpu_material_library_use_function(), gpu_shader_create_info_compile(), blender::gpu::shader::gpu_shader_dependency_get_resolved_source(), gpu_shader_dependency_init(), blender::nodes::node_shader_math_cc::gpu_shader_get_name(), blender::draw::gpencil::grease_pencil_layer_cache_add(), blender::ed::greasepencil::grease_pencil_layer_parent_set(), blender::bke::blendfile::PartialWriteContext::id_create(), id_name_final_build(), image_save_post(), IMB_byte_from_float(), IMB_colormanagement_display_get_default_name(), IMB_colormanagement_display_get_default_view_transform_name(), IMB_colormanagement_display_get_indexed_name(), IMB_colormanagement_display_items_add(), IMB_colormanagement_get_float_colorspace(), IMB_colormanagement_get_rect_colorspace(), IMB_colormanagement_imbuf_for_write(), IMB_colormanagement_look_get_default_name(), IMB_colormanagement_look_get_indexed_name(), IMB_colormanagement_look_items_add(), IMB_colormanagement_look_validate_for_view(), IMB_colormanagement_setup_glsl_draw_from_space(), IMB_colormanagement_srgb_colorspace_name_get(), IMB_colormanagement_validate_settings(), IMB_exr_add_channels(), blender::gpu::GLShader::init(), blender::ed::asset::index::init_indexer_entry_from_value(), blender::gpu::init_struct(), blender::ed::greasepencil::join_object_with_active(), blender::animrig::StripKeyframeData::keyframe_insert(), link_append_context_library_blohandle_ensure(), link_nodes(), blender::io::usd::UsdExportTest::load_file_and_depsgraph(), make_standard_socket_type(), menu_items_from_ui_create(), blender::draw::mesh_cd_calc_used_gpu_layers(), modifier_vgroup_ui(), blender::nodes::decl::modify_subtype_except_for_storage(), blender::nodes::decl::modify_subtype_except_for_storage(), blender::asset_system::AssetLibraryService::move_runtime_current_file_into_on_disk_library(), blender::bke::node_modify_socket_type(), node_reroute_declare(), blender::ed::space_node::node_socket_get_label(), blender::bke::node_type_base_custom(), blender::asset_system::utils::normalize_path(), uiLayout::op(), uiLayout::op_enum(), uiLayout::op_enum_items(), uiLayout::op_menu_enum(), uiLayout::op_menu_enum(), blender::fstream::open(), blender::bke::bake::pack_files_from_directory(), paint_brush_set_default_reference(), uiLayout::panel_prop(), blender::io::path_reference(), pchan_duplicate_map(), blender::io::alembic::preprocess_sample(), blender::gpu::Shader::print_log(), uiLayout::prop(), uiLayout::prop_enum(), uiLayout::prop_enum(), uiLayout::prop_enum(), uiLayout::prop_search(), uiLayout::prop_with_menu(), uiLayout::prop_with_popover(), uiLayout::props_enum(), pyrna_struct_bl_rna_get_subclass(), blender::io::grease_pencil::SVGImporter::read(), blender::bke::id_hash::read_file(), blender::ed::object::shapekey::ShapeKeyItem::rename(), blender::ui::bonecollections::BoneCollectionItem::rename(), blender::ui::greasepencil::LayerGroupViewItem::rename(), blender::ui::greasepencil::LayerViewItem::rename(), blender::nodes::node_fn_replace_string_cc::replace_all(), rna_def_node_item_array_common_functions(), rna_def_node_item_array_new_with_socket_and_name(), rna_def_node_item_array_socket_item_common(), rna_def_space_properties_filter(), blender::ed::geometry::rna_property_for_attribute_type_retrieve_value(), blender::io::usd::USDMaterialReader::set_node_input(), blender::nodes::inverse_eval::set_rna_property(), blender::ed::object::shade_auto_smooth_exec(), blender::draw::Shader::ShaderCache::ShaderCache(), blender::ed::asset::shelf::AssetViewItem::should_be_filtered_visible(), blender::ui::AbstractViewItem::should_be_filtered_visible(), blender::ed::asset::shelf::show_catalog_in_visible_shelves(), blender::animrig::Action::slot_display_name_define(), blender::animrig::Action::slot_find_by_identifier(), blender::animrig::Action::slot_identifier_define(), blender::ed::spreadsheet::spreadsheet_column_assign_runtime_data(), blender::gpu::shader::ShaderCreateInfo::ResourceString::str_no_array(), StringRefNull(), blender::ui::template_asset_shelf_popover(), template_search_setup(), blender::asset_system::tests::TEST_F(), blender::io::usd::TEST_F(), UI_but_extra_operator_icon_add(), ui_def_but_rna_propname(), ui_pie_menu_level_invoke(), ui_template_id(), ui_template_list_data_retrieve(), ui_tooltip_data_from_button_or_extra_icon(), uiDefButO(), uiDefIconButO(), uiDefIconTextButO(), uiTemplateAnyID(), uiTemplateCacheFilePointer(), uiTemplateColormanagedViewSettings(), uiTemplateColorPicker(), uiTemplateColorRamp(), uiTemplateColorspaceSettings(), uiTemplateComponentMenu(), uiTemplateCryptoPicker(), uiTemplateCurveMapping(), uiTemplateCurveProfile(), uiTemplateEventFromKeymapItem(), uiTemplateHistogram(), uiTemplateIconView(), uiTemplateImage(), uiTemplateLayers(), uiTemplateLightLinkingCollection(), uiTemplateMarker(), uiTemplateMatrix(), uiTemplateMovieClip(), uiTemplateMovieclipInformation(), uiTemplatePalette(), uiTemplatePathBuilder(), uiTemplateTrack(), uiTemplateVectorscope(), uiTemplateWaveform(), blender::ed::transform::uniqueOrientationName(), blender::bke::bake::unpack_bake_to_disk(), WM_drag_asset_id_import(), WM_drag_get_item_name(), blender::io::grease_pencil::PDFExporter::write_to_file(), and blender::io::grease_pencil::SVGExporter::write_to_file().
|
constexpr |
Get the char at the given index.
Definition at line 470 of file BLI_string_ref.hh.
References BLI_assert, blender::StringRefBase::data_, and blender::StringRefBase::size_.