Blender V2.61 - r43446
Functions

BLI_string.h File Reference

Go to the source code of this file.

Functions

char * BLI_strdup (const char *str)
char * BLI_strdupn (const char *str, const size_t len)
char * BLI_strdupcat (const char *str1, const char *str2)
char * BLI_strncpy (char *dst, const char *src, const size_t maxncpy)
char * BLI_getQuotedStr (const char *str, const char *prefix)
char * BLI_replacestr (char *str, const char *oldText, const char *newText)
size_t BLI_snprintf (char *buffer, size_t len, const char *format,...)
char * BLI_sprintfN (const char *format,...)
size_t BLI_strescape (char *dst, const char *src, const size_t maxlen)
int BLI_strcaseeq (const char *a, const char *b)
char * BLI_strcasestr (const char *s, const char *find)
int BLI_strcasecmp (const char *s1, const char *s2)
int BLI_strncasecmp (const char *s1, const char *s2, size_t len)
int BLI_natstrcmp (const char *s1, const char *s2)
size_t BLI_strnlen (const char *str, size_t maxlen)
void BLI_timestr (double _time, char *str)
void BLI_ascii_strtolower (char *str, int len)
void BLI_ascii_strtoupper (char *str, int len)

Detailed Description

Definition in file BLI_string.h.


Function Documentation

void BLI_ascii_strtolower ( char *  str,
int  len 
)

Definition at line 402 of file string.c.

References i, and len().

Referenced by WM_operator_py_idname().

void BLI_ascii_strtoupper ( char *  str,
int  len 
)

Definition at line 411 of file string.c.

References i, and len().

Referenced by WM_operator_bl_idname().

char* BLI_getQuotedStr ( const char *  str,
const char *  prefix 
)
int BLI_natstrcmp ( const char *  s1,
const char *  s2 
)

Definition at line 326 of file string.c.

References NULL.

Referenced by bli_compare(), compare_date(), compare_name(), compare_size(), and vgroup_sort().

char* BLI_replacestr ( char *  str,
const char *  oldText,
const char *  newText 
)

Returns a copy of the cstring str into a newly mallocN'd string with all instances of oldText replaced with newText, and returns it.

Parameters:
strThe string to replace occurances of oldText in
oldTextThe text in the string to find and replace
newTextThe text in the string to find and replace
Return values:
Returnsthe duplicated string

Definition at line 192 of file string.c.

References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), BLI_strdup(), NULL, and strlen().

size_t BLI_snprintf ( char *  buffer,
size_t  len,
const char *  format,
  ... 
)

Definition at line 81 of file string.c.

Referenced by acf_shapekey_name(), add_hook_object(), add_keyblock(), ANIM_add_driver(), AnimationImporter::apply_matrix_curves(), AnimationImporter::Assign_transform_animations(), BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), BKE_ptcache_update_info(), BKE_write_undo(), BL_ArmatureConstraint::BL_ArmatureConstraint(), bli_adddirstrings(), BLI_copy(), BLI_create_symlink(), BLI_delete(), BLI_move(), BLI_path_frame_range(), BLI_uniquename_cb(), BLO_write_file(), boid_new_state(), bone_autoside_name(), bpy_text_filename_get(), bUnit_ReplaceString(), bUnit_ToUnitAltName(), but_shortcut_name_func(), calculate_tface_materialname(), check_for_dupid(), clip_draw_curfra_label(), codegen_convert_datatype(), convert_tfacenomaterial(), curve_rename_fcurves(), customdata_version_242(), AnimationExporter::dae_animation(), AnimationExporter::dae_baked_animation(), AnimationExporter::dae_bone_animation(), do_history(), do_versions(), draw_controller_header(), draw_marker_texts(), draw_modifier(), draw_new_particle_system(), draw_nla_channel_list_gl(), draw_selected_name(), draw_seq_handle(), draw_seq_text(), draw_text_main(), draw_viewport_fps(), draw_viewport_name(), dynamicPaint_initBake(), ED_image_draw_info(), ed_marker_add(), ed_marker_move_modal(), ED_screen_full_toggle(), AnimationExporter::enable_fcurves(), AnimationImporter::evaluate_animation(), file_draw_buttons(), filelist_from_main(), flip_side_name(), fsmenu_read_system(), get_path_system(), get_path_user(), get_proxy_filename(), get_proxy_fname(), get_rna_access(), ArmatureImporter::get_rna_path_for_joint(), get_tc_filename(), getname_anim_fcurve(), gp_drawui_layer(), gpu_material_set_attrib_id(), GPU_nodes_extract_dynamic_inputs(), GPU_print_framebuffer_error(), GPU_shader_export(), GPU_texture_create_nD(), graph_panel_drivers(), headerResize(), id_drop_copy(), IDnames_to_dyn_pupstring(), IMB_anim_absolute(), IMB_thumb_create(), initglobals(), ipo_to_animdata(), list_item_row(), logic_buttons(), logic_buttons_new(), make_proxy_exec(), Matrix_str(), meshdeform_matrix_solve(), minimize_stretch_iteration(), mtex_adrcodes_to_paths(), multiple_scattering_diffusion(), multires_external_save_invoke(), new_folder_path(), nla_draw_strip_frames_text(), nla_draw_strip_text(), node_composit_buts_image(), node_sockets_panel(), node_uiblocks_init(), ntreeCompositExecTree(), object_add_particle_system(), outliner_filter_has_name(), outputNumInput(), particles_fluid_step(), path_drop_copy(), pose_slide_draw_status(), poselib_preview_apply(), print_part_stats(), ptcache_filename(), ptcache_path(), pyrna_enum_to_py(), pyrna_func_call(), render_result_exr_file_path(), RIG_printCtrl(), RNA_path_append(), AnimationExporter::sample_and_write_bone_animation(), seq_dupe_animdata(), seq_free_animdata(), seq_offset_animdata(), seq_proxy_get_fname(), seq_remap_paths(), seqbase_unique_name(), set_addons(), setNearestAxis2d(), setNearestAxis3d(), setUserConstraint(), shapekey_adrcodes_to_paths(), sk_autoname(), stampdata(), template_ID(), template_texture_user_menu(), ExtraHandler::textData(), thumbname_from_uri(), thumbpath_from_uri(), AnimationImporter::translate_animation_OLD(), ui_but_copy_paste(), ui_but_menu(), ui_check_but(), ui_get_but_string(), ui_node_draw_input(), ui_node_menu_column(), ui_node_sock_name(), ui_tooltip_create(), ui_update_block_buts_rgb(), uiBlockPicker(), uiDefAutoButR(), uiPupMenuBegin(), uiPupMenuError(), uiPupMenuOkee(), uiTemplateImage(), uiTemplateList(), uiTemplateTextureUser(), unique_property(), unit_as_string(), unit_scale_str(), unpack_all_invoke(), unpack_menu(), unpackImage(), unpackSound(), unpackVFont(), v3d_editvertex_buts(), verify_adt_action(), vgroup_duplicate(), view3d_main_area_draw_info(), vol_precache_objectinstance_threads(), wm_autosave_location(), wm_block_create_splash(), wm_window_title(), and writePackedFile().

char* BLI_sprintfN ( const char *  format,
  ... 
)
int BLI_strcasecmp ( const char *  s1,
const char *  s2 
)
int BLI_strcaseeq ( const char *  a,
const char *  b 
)

Compare two strings without regard to case.

Return values:
Trueif the strings are equal, false otherwise.

Definition at line 258 of file string.c.

References BLI_strcasecmp().

Referenced by ExtraHandler::parseElement().

char* BLI_strcasestr ( const char *  s,
const char *  find 
)
char* BLI_strdup ( const char *  str)
char* BLI_strdupcat ( const char *  str1,
const char *  str2 
)

Appends the two strings, and returns new mallocN'ed string

Parameters:
str1first string for copy
str2second string for append
Return values:
Returnsdst

Definition at line 57 of file string.c.

References len(), MEM_mallocN(), and strlen().

Referenced by bli_builddir().

char* BLI_strdupn ( const char *  str,
const size_t  len 
)

Duplicates the first len bytes of cstring str into a newly mallocN'd string and returns it. str is assumed to be at least len bytes long.

Parameters:
strThe string to be duplicated
lenThe number of bytes to duplicate
Return values:
Returnsthe duplicated string

Definition at line 44 of file string.c.

References len(), and MEM_mallocN().

Referenced by BKE_keyingset_add_path(), BKE_nlastrip_validate_fcurves(), BLI_file_read_as_lines(), BLI_getQuotedStr(), BLI_strdup(), txt_insert_buf(), verify_driver_fcurve(), and verify_fcurve().

size_t BLI_strescape ( char *  dst,
const char *  src,
const size_t  maxlen 
)

Definition at line 124 of file string.c.

References len().

Referenced by id_drop_copy(), and RNA_property_as_string().

int BLI_strncasecmp ( const char *  s1,
const char *  s2,
size_t  len 
)

Definition at line 305 of file string.c.

References i, and len().

Referenced by avi_fetchibuf(), BLI_strcasestr(), and txt_unindent().

char* BLI_strncpy ( char *  dst,
const char *  src,
const size_t  maxncpy 
)

Like strncpy but ensures dst is always '\0' terminated.

Parameters:
dstDestination for copy
srcSource string to copy
maxncpyMaximum number of characters to copy (generally the size of dst)
Return values:
Returnsdst

Definition at line 70 of file string.c.

References strlen().

Referenced by acf_filldrivers_name(), acf_generic_idblock_name(), acf_gpl_name(), acf_group_name(), acf_object_name(), acf_shapekey_name(), acf_summary_name(), action_groups_add_new(), actuator_add_exec(), AnimationImporter::add_bone_fcurve(), add_curve(), add_hook_object(), add_ibuf_size(), add_keyblock(), add_new_constraint_internal(), add_object(), add_plugin_seq(), add_plugin_tex(), add_scene(), add_text(), ANIM_add_driver(), ANIM_channel_debug_print_info(), anim_getnew(), AnimationImporter::apply_matrix_curves(), armature_autoside_names_exec(), armature_extrude_exec(), AnimationImporter::Assign_color_animations(), AnimationImporter::Assign_float_animations(), MeshImporter::assign_textures_to_uvlayer(), AnimationImporter::Assign_transform_animations(), autocomplete_directory(), autocomplete_do_name(), autocomplete_end(), autotexname(), BKE_add_image_file(), BKE_add_image_imbuf(), BKE_add_movieclip_file(), BKE_keyingset_add(), BKE_keyingset_add_path(), BKE_library_filepath_set(), BKE_makepicstring(), BKE_nlastrip_validate_name(), BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), BKE_rebase_path(), BKE_tracking_can_reconstruct(), BKE_tracking_new_object(), BKE_tracking_reconstruction_context_new(), BKE_write_undo(), bli_adddirstrings(), bli_builddir(), BLI_current_working_dir(), BLI_dir_create_recursive(), BLI_exists(), BLI_getlastdir(), BLI_join_dirfile(), BLI_make_existing_file(), BLI_make_file_string(), BLI_parent_dir(), BLI_path_abs(), BLI_path_cwd(), BLI_path_frame_range(), BLI_path_rel(), BLI_split_dirfile(), BLI_splitdirstring(), BLI_testextensie_glob(), BLI_uniquename_cb(), bli_where_am_i(), BLI_where_is_temp(), blo_find_main(), BLO_is_a_library(), blo_openblenderfile(), blo_read_blendafterruntime(), blo_read_file_internal(), BLO_read_from_memfile(), boid_new_rule(), bone_autoside_name(), bookmark_select_exec(), bpath_relocate_visitor(), bpy_lib_enter(), bpy_lib_load(), bpy_text_import(), cache_voxeldata(), cdf_layer_add(), checkPackedFile(), clip_panel_operator_redo_header(), constraint_bone_name_fix(), controller_add_exec(), copy_attr(), copy_image(), copy_object(), copyData(), CTX_store_add(), customData_add_layer__internal(), CustomData_external_add(), customdata_external_filename(), direct_link_library(), do_versions(), do_write_image_or_movie(), draw_constraint(), draw_movieclip_notes(), draw_nla_channel_list_gl(), draw_suggestion_list(), drivers_path_rename_fix(), duplicateEditBoneObjects(), dynamicPaint_bakeImageSequence(), dynamicPaint_initBake(), dynamicPaint_outputSurfaceImage(), dynamicPaintSurface_setUniqueName(), ED_area_headerprint(), ED_armature_bone_rename(), ED_armature_edit_bone_add(), ED_armature_from_edit(), ED_fileselect_set_params(), ed_marker_duplicate_apply(), ED_object_modifier_add(), ED_object_parent(), ED_vgroup_add_name(), fcurve_add_to_list(), file_browse_exec(), file_change_dir(), file_directory_exec(), file_directory_new_exec(), file_draw_string(), file_expand_directory(), file_panel_category(), file_panel_operator_header(), file_refresh(), file_rename_exec(), file_select_do(), file_shorten_string(), filelist_from_library(), filelist_read_library(), filelist_setdir(), filelist_setfilter_types(), findFileRecursive(), fix_relpaths_library(), flip_side_name(), folderlist_popdir(), folderlist_pushdir(), game_property_new(), get_brush_icon(), get_filename(), get_index_dir(), get_path_local(), get_path_system(), get_path_user(), get_proxy_fname(), get_sequence_fname(), get_suggest_prefix(), get_thumb_dir(), GetFontId(), gpu_node_input_link(), gpu_nodes_get_vertex_attributes(), GPU_shader_export(), group_verify_socket(), groupname_to_code(), IDP_AssignString(), idp_generic_copy(), IDP_NewIDPArray(), IDP_NewString(), idriver_to_cdriver(), image_load_image_file(), image_load_movie_file(), image_load_sequence_file(), image_replace_exec(), image_save_sequence_exec(), image_undo_push_tile(), IMB_anim_set_index_dir(), imb_cache_filename(), IMB_exr_add_channel(), imb_exr_get_layer(), imb_exr_get_pass(), IMB_exr_set_channel(), imb_exr_split_channel_name(), IMB_index_builder_create(), IMB_indexer_open(), IMB_loadiffname(), IMB_metadata_get_field(), IMB_open_anim(), IMB_testiffname(), init_iconfile_list(), init_userdef_do_versions(), join_armature_exec(), joined_armature_fix_links(), library_append_end(), load_file(), load_game_data(), load_vfont(), loop_sync(), main(), make_boneList(), make_object_duplilist_real(), make_pass_name(), make_socket(), ml_addlayer_cb(), ml_addpass_cb(), modifier_new(), movieclip_load_movie_file(), namebutton_cb(), new_folder_path(), newPackedFile(), nla_draw_strip_text(), node_browse_text_cb(), node_composit_init_output_file(), node_draw_basis(), node_draw_hidden(), node_group_add_socket(), node_type_base(), node_type_storage(), nodeAddNode(), nodeMakeDynamicType(), ntreeAddTree(), object_add_particle_system(), object_mouse_select_menu(), objfnt_to_ftvfontdata(), open_plugin_seq(), ImagesExporter::operator()(), operator_call_cb(), operator_search_cb(), parent_set_exec(), PE_undo_push(), pose_add_group(), pose_autoside_names_exec(), pose_bone_do_paste(), pose_clear_user_transforms_exec(), poselib_add_exec(), poselib_preview_apply(), poselib_preview_handle_event(), poselib_rename_exec(), poselib_sanitise_exec(), preview_prepare_scene(), pyop_getinstance(), RE_Database_FromScene(), RE_engine_render(), RE_NewRender(), RE_set_customdata_names(), RE_WriteEnvmapResult(), read_global(), read_libraries(), read_undosave(), rename_id(), renamebutton_cb(), render_layer_add_pass(), render_result_exr_file_path(), render_result_exr_file_read_path(), render_result_new(), reopen_text(), return_editmesh_vgroup(), rewrite_path_alloc(), rewrite_path_fixed(), rna_search_cb(), run_python(), save_image_doit(), save_image_options_init(), scene_add_render_layer(), screenshot_exec(), sculpt_undo_push_node(), sculpt_update_cache_invariants(), select_single_seq(), sensor_add_exec(), seq_load_apply(), seq_load_operator_info(), seq_proxy_get_fname(), seq_remap_paths(), seq_swap(), seqbase_unique_name_recursive(), sequence_guess_offset(), sequencer_add_effect_strip_exec(), sequencer_add_image_strip(), sequencer_add_image_strip_exec(), sequencer_add_movie_strip(), sequencer_add_scene_strip_exec(), sequencer_change_path_exec(), sequencer_generic_invoke_path__internal(), sequencer_select_invoke(), sequencer_separate_images_exec(), set_constraint_nth_target(), set_output(), set_property_valstr(), setConstraint(), setError(), setLocalConstraint(), setup_app_data(), solve_camera_invoke(), solve_camera_updatejob(), sound_mixdown_exec(), sound_new_file(), space_image_file_exists_poll(), split_groups_action_temp(), stampdata(), StartKetsjiShell(), surface_setUniqueOutputName(), test_env_path(), test_path(), text_file_modified(), text_find_set_selected_exec(), text_ignore_modified(), text_replace_set_selected_exec(), thumbnails_start(), tracks_map_new(), AnimationImporter::translate_animation_OLD(), txt_copy_selected(), txt_new_linen(), txt_sel_to_buf(), txt_to_buf(), txt_write_file(), ui_apply_autokey_undo(), ui_but_anim_expression_get(), ui_but_copy_paste(), ui_but_drop(), ui_check_but(), ui_get_but_string(), ui_item_name_add_colon(), ui_node_menu_column(), ui_node_sock_name(), ui_searchbox_apply(), ui_set_but_string(), ui_set_name_menu(), ui_style_new(), ui_text_leftclip(), ui_textedit_set_cursor_pos(), ui_tooltip_create(), uiBeginBlock(), uiBeginPanel(), uiBlockPicker(), uiItemMenuEnumO(), uiItemMenuEnumR(), uiPupMenuError(), uiSearchItemAdd(), uiStyleInit(), undo_editmode_push(), undo_stack_push_begin(), unique_property(), unpack_menu(), unpackImage(), unpackSound(), unpackVFont(), updateDuplicateSubtargetObjects(), uri_from_filename(), verify_pose_channel(), vgroup_duplicate(), vgroup_init_remap(), view3d_modeselect_pup(), view3d_panel_operator_redo_header(), weightvg_do_mask(), what_does_obaction(), what_does_parent(), widget_draw_text(), wm_add_default(), wm_drop_operator_options(), WM_dropboxmap_find(), WM_event_start_drag(), WM_init(), WM_jobs_get(), WM_keyconfig_new(), WM_keyconfig_remove(), WM_keyconfig_set_active(), WM_keymap_add_item(), WM_keymap_item_to_string(), wm_keymap_new(), WM_keymap_restore_item_to_default(), WM_keymap_verify_item(), wm_link_append_exec(), wm_link_append_invoke(), WM_operator_bl_idname(), wm_operator_create(), WM_operator_py_idname(), WM_operatortype_macro_define(), wm_save_as_mainfile_exec(), wm_save_as_mainfile_invoke(), wm_save_mainfile_invoke(), wm_window_copy(), wm_window_match_do(), wm_window_match_init(), WM_write_file(), write_crash_blend(), write_global(), write_objects(), write_renderinfo(), and writePackedFile().

size_t BLI_strnlen ( const char *  str,
size_t  maxlen 
)
void BLI_timestr ( double  _time,
char *  str 
)