Blender  V3.3
Functions
BLI_string.h File Reference
#include <inttypes.h>
#include <stdarg.h>
#include "BLI_compiler_attrs.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Macros

String Copy/Format Macros

Avoid repeating destination with sizeof(..).

Note
ARRAY_SIZE allows pointers on some platforms.
#define STRNCPY(dst, src)   BLI_strncpy(dst, src, ARRAY_SIZE(dst))
 
#define STRNCPY_RLEN(dst, src)   BLI_strncpy_rlen(dst, src, ARRAY_SIZE(dst))
 
#define SNPRINTF(dst, format, ...)   BLI_snprintf(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
 
#define SNPRINTF_RLEN(dst, format, ...)    BLI_snprintf_rlen(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
 
#define STR_CONCAT(dst, len, suffix)    len += BLI_strncpy_rlen(dst + len, suffix, ARRAY_SIZE(dst) - len)
 
#define STR_CONCATF(dst, len, format, ...)    len += BLI_snprintf_rlen(dst + len, ARRAY_SIZE(dst) - len, format, __VA_ARGS__)
 
Equal to Any Element (STR_ELEM) Macro

Follows ELEM macro convention.

#define _VA_STR_ELEM2(v, a)   (strcmp(v, a) == 0)
 
#define _VA_STR_ELEM3(v, a, b)    (_VA_STR_ELEM2(v, a) || (_VA_STR_ELEM2(v, b)))
 
#define _VA_STR_ELEM4(v, a, b, c)    (_VA_STR_ELEM3(v, a, b) || (_VA_STR_ELEM2(v, c)))
 
#define _VA_STR_ELEM5(v, a, b, c, d)    (_VA_STR_ELEM4(v, a, b, c) || (_VA_STR_ELEM2(v, d)))
 
#define _VA_STR_ELEM6(v, a, b, c, d, e)    (_VA_STR_ELEM5(v, a, b, c, d) || (_VA_STR_ELEM2(v, e)))
 
#define _VA_STR_ELEM7(v, a, b, c, d, e, f)    (_VA_STR_ELEM6(v, a, b, c, d, e) || (_VA_STR_ELEM2(v, f)))
 
#define _VA_STR_ELEM8(v, a, b, c, d, e, f, g)    (_VA_STR_ELEM7(v, a, b, c, d, e, f) || (_VA_STR_ELEM2(v, g)))
 
#define _VA_STR_ELEM9(v, a, b, c, d, e, f, g, h)    (_VA_STR_ELEM8(v, a, b, c, d, e, f, g) || (_VA_STR_ELEM2(v, h)))
 
#define _VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i)    (_VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) || (_VA_STR_ELEM2(v, i)))
 
#define _VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j)    (_VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) || (_VA_STR_ELEM2(v, j)))
 
#define _VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k)    (_VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) || (_VA_STR_ELEM2(v, k)))
 
#define _VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l)    (_VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) || (_VA_STR_ELEM2(v, l)))
 
#define _VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m)    (_VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) || (_VA_STR_ELEM2(v, m)))
 
#define _VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n)    (_VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) || (_VA_STR_ELEM2(v, n)))
 
#define _VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)    (_VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) || (_VA_STR_ELEM2(v, o)))
 
#define _VA_STR_ELEM17(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)    (_VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) || (_VA_STR_ELEM2(v, p)))
 
#define STR_ELEM(...)   VA_NARGS_CALL_OVERLOAD(_VA_STR_ELEM, __VA_ARGS__)
 

Functions

char * BLI_strdupn (const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
char * BLI_strdup (const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
 
char * BLI_strdupcat (const char *__restrict str1, const char *__restrict str2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
 
char * BLI_strncpy (char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
 
char * BLI_strncpy_ensure_pad (char *__restrict dst, const char *__restrict src, char pad, size_t maxncpy) ATTR_NONNULL()
 
size_t BLI_strncpy_rlen (char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
size_t BLI_strcpy_rlen (char *__restrict dst, const char *__restrict src) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BLI_str_quoted_substr_range (const char *__restrict str, const char *__restrict prefix, int *__restrict r_start, int *__restrict r_end) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
 
bool bool BLI_str_quoted_substr (const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxlen)
 
char * BLI_str_replaceN (const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
 
void BLI_str_replace_char (char *str, char src, char dst) ATTR_NONNULL()
 
bool BLI_str_replace_table_exact (char *string, size_t string_len, const char *replace_table[][2], int replace_table_len)
 
size_t BLI_snprintf (char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
 
size_t ATTR_PRINTF_FORMAT (3, 4)
 
size_t BLI_snprintf_rlen (char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
 
size_t BLI_vsnprintf (char *__restrict buffer, size_t maxncpy, const char *__restrict format, va_list arg) ATTR_PRINTF_FORMAT(3
 
size_t size_t BLI_vsnprintf_rlen (char *__restrict buffer, size_t maxncpy, const char *__restrict format, va_list arg) ATTR_PRINTF_FORMAT(3
 
size_t size_t char * BLI_sprintfN (const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
 
size_t size_t char size_t BLI_str_escape (char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
 
size_t BLI_str_unescape_ex (char *__restrict dst, const char *__restrict src, size_t src_maxncpy, size_t dst_maxncpy, bool *r_is_complete) ATTR_NONNULL()
 
size_t BLI_str_unescape (char *__restrict dst, const char *__restrict src, size_t src_maxncpy) ATTR_NONNULL()
 
const char * BLI_str_escape_find_quote (const char *str) ATTR_NONNULL()
 
size_t BLI_str_format_int_grouped (char dst[16], int num) ATTR_NONNULL()
 
size_t BLI_str_format_uint64_grouped (char dst[16], uint64_t num) ATTR_NONNULL()
 
void BLI_str_format_byte_unit (char dst[15], long long int bytes, bool base_10) ATTR_NONNULL()
 
void BLI_str_format_decimal_unit (char dst[7], int number_to_format) ATTR_NONNULL()
 
int BLI_strcaseeq (const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
char * BLI_strcasestr (const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
char * BLI_strncasestr (const char *s, const char *find, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_strcasecmp (const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_strncasecmp (const char *s1, const char *s2, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_strcasecmp_natural (const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_strcmp_ignore_pad (const char *str1, const char *str2, char pad) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
size_t BLI_strnlen (const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
void BLI_str_tolower_ascii (char *str, size_t len) ATTR_NONNULL()
 
void BLI_str_toupper_ascii (char *str, size_t len) ATTR_NONNULL()
 
char BLI_tolower_ascii (const char c)
 
char BLI_toupper_ascii (const char c)
 
void BLI_str_rstrip (char *str) ATTR_NONNULL()
 
int BLI_str_rstrip_float_zero (char *str, char pad) ATTR_NONNULL()
 
int BLI_str_index_in_array_n (const char *__restrict str, const char **__restrict str_array, int str_array_len) ATTR_NONNULL()
 
int BLI_str_index_in_array (const char *__restrict str, const char **__restrict str_array) ATTR_NONNULL()
 
bool BLI_str_startswith (const char *__restrict str, const char *__restrict start) ATTR_NONNULL()
 
bool BLI_str_endswith (const char *__restrict str, const char *__restrict end) ATTR_NONNULL()
 
bool BLI_strn_endswith (const char *__restrict str, const char *__restrict end, size_t length) ATTR_NONNULL()
 
size_t BLI_str_partition (const char *str, const char delim[], const char **sep, const char **suf) ATTR_NONNULL()
 
size_t BLI_str_rpartition (const char *str, const char delim[], const char **sep, const char **suf) ATTR_NONNULL()
 
size_t BLI_str_partition_ex (const char *str, const char *end, const char delim[], const char **sep, const char **suf, bool from_right) ATTR_NONNULL(1
 
size_t int BLI_string_max_possible_word_count (int str_len)
 
bool BLI_string_has_word_prefix (const char *haystack, const char *needle, size_t needle_len)
 
bool BLI_string_all_words_matched (const char *name, const char *str, int(*words)[2], int words_len)
 
int BLI_string_find_split_words (const char *str, size_t len, char delim, int r_words[][2], int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 

Macro Definition Documentation

◆ _VA_STR_ELEM10

#define _VA_STR_ELEM10 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
 
)     (_VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) || (_VA_STR_ELEM2(v, i)))

Definition at line 520 of file BLI_string.h.

◆ _VA_STR_ELEM11

#define _VA_STR_ELEM11 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
 
)     (_VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) || (_VA_STR_ELEM2(v, j)))

Definition at line 522 of file BLI_string.h.

◆ _VA_STR_ELEM12

#define _VA_STR_ELEM12 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
 
)     (_VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) || (_VA_STR_ELEM2(v, k)))

Definition at line 524 of file BLI_string.h.

◆ _VA_STR_ELEM13

#define _VA_STR_ELEM13 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  k,
  l 
)     (_VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) || (_VA_STR_ELEM2(v, l)))

Definition at line 526 of file BLI_string.h.

◆ _VA_STR_ELEM14

#define _VA_STR_ELEM14 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  k,
  l,
 
)     (_VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) || (_VA_STR_ELEM2(v, m)))

Definition at line 528 of file BLI_string.h.

◆ _VA_STR_ELEM15

#define _VA_STR_ELEM15 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  k,
  l,
  m,
 
)     (_VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) || (_VA_STR_ELEM2(v, n)))

Definition at line 530 of file BLI_string.h.

◆ _VA_STR_ELEM16

#define _VA_STR_ELEM16 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  k,
  l,
  m,
  n,
 
)     (_VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) || (_VA_STR_ELEM2(v, o)))

Definition at line 532 of file BLI_string.h.

◆ _VA_STR_ELEM17

#define _VA_STR_ELEM17 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  k,
  l,
  m,
  n,
  o,
 
)     (_VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) || (_VA_STR_ELEM2(v, p)))

Definition at line 534 of file BLI_string.h.

◆ _VA_STR_ELEM2

#define _VA_STR_ELEM2 (   v,
 
)    (strcmp(v, a) == 0)

Definition at line 505 of file BLI_string.h.

◆ _VA_STR_ELEM3

#define _VA_STR_ELEM3 (   v,
  a,
 
)     (_VA_STR_ELEM2(v, a) || (_VA_STR_ELEM2(v, b)))

Definition at line 506 of file BLI_string.h.

◆ _VA_STR_ELEM4

#define _VA_STR_ELEM4 (   v,
  a,
  b,
 
)     (_VA_STR_ELEM3(v, a, b) || (_VA_STR_ELEM2(v, c)))

Definition at line 508 of file BLI_string.h.

◆ _VA_STR_ELEM5

#define _VA_STR_ELEM5 (   v,
  a,
  b,
  c,
 
)     (_VA_STR_ELEM4(v, a, b, c) || (_VA_STR_ELEM2(v, d)))

Definition at line 510 of file BLI_string.h.

◆ _VA_STR_ELEM6

#define _VA_STR_ELEM6 (   v,
  a,
  b,
  c,
  d,
  e 
)     (_VA_STR_ELEM5(v, a, b, c, d) || (_VA_STR_ELEM2(v, e)))

Definition at line 512 of file BLI_string.h.

◆ _VA_STR_ELEM7

#define _VA_STR_ELEM7 (   v,
  a,
  b,
  c,
  d,
  e,
 
)     (_VA_STR_ELEM6(v, a, b, c, d, e) || (_VA_STR_ELEM2(v, f)))

Definition at line 514 of file BLI_string.h.

◆ _VA_STR_ELEM8

#define _VA_STR_ELEM8 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
 
)     (_VA_STR_ELEM7(v, a, b, c, d, e, f) || (_VA_STR_ELEM2(v, g)))

Definition at line 516 of file BLI_string.h.

◆ _VA_STR_ELEM9

#define _VA_STR_ELEM9 (   v,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
 
)     (_VA_STR_ELEM8(v, a, b, c, d, e, f, g) || (_VA_STR_ELEM2(v, h)))

Definition at line 518 of file BLI_string.h.

◆ SNPRINTF

#define SNPRINTF (   dst,
  format,
  ... 
)    BLI_snprintf(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)

Definition at line 485 of file BLI_string.h.

◆ SNPRINTF_RLEN

#define SNPRINTF_RLEN (   dst,
  format,
  ... 
)     BLI_snprintf_rlen(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)

Definition at line 486 of file BLI_string.h.

◆ STR_CONCAT

#define STR_CONCAT (   dst,
  len,
  suffix 
)     len += BLI_strncpy_rlen(dst + len, suffix, ARRAY_SIZE(dst) - len)

Definition at line 488 of file BLI_string.h.

◆ STR_CONCATF

#define STR_CONCATF (   dst,
  len,
  format,
  ... 
)     len += BLI_snprintf_rlen(dst + len, ARRAY_SIZE(dst) - len, format, __VA_ARGS__)

Definition at line 490 of file BLI_string.h.

◆ STR_ELEM

#define STR_ELEM (   ...)    VA_NARGS_CALL_OVERLOAD(_VA_STR_ELEM, __VA_ARGS__)

Definition at line 539 of file BLI_string.h.

◆ STRNCPY

#define STRNCPY (   dst,
  src 
)    BLI_strncpy(dst, src, ARRAY_SIZE(dst))

Definition at line 483 of file BLI_string.h.

◆ STRNCPY_RLEN

#define STRNCPY_RLEN (   dst,
  src 
)    BLI_strncpy_rlen(dst, src, ARRAY_SIZE(dst))

Definition at line 484 of file BLI_string.h.

Function Documentation

◆ ATTR_PRINTF_FORMAT()

size_t ATTR_PRINTF_FORMAT ( ,
 
)

◆ BLI_snprintf()

size_t BLI_snprintf ( char *__restrict  dst,
size_t  maxncpy,
const char *__restrict  format,
  ... 
)

Portable replacement for snprintf

Referenced by acf_nla_curve_name(), acf_shapekey_name(), AnimationImporter::add_bone_animation_sampled(), add_hook_object(), ANIM_add_driver(), AnimationImporter::apply_matrix_curves(), applyBakeTime(), applyBevelWeight(), applyBoneEnvelope(), applyBoneRoll(), applyCrease(), applyCurveShrinkFatten(), applyGPOpacity(), applyGPShrinkFatten(), applyMaskShrinkFatten(), applyMirror(), applyPushPull(), applyShear(), applyShrinkFatten(), applyTilt(), applyToSphere(), arg_handle_addons_set(), AnimationImporter::Assign_transform_animations(), bc_enable_fcurves(), Bend(), BKE_blender_version_blendfile_string_from_values(), BKE_fluid_cache_new_name_for_current_session(), BKE_image_add_renderslot(), BKE_image_get_tile_label(), BKE_image_save_options_init(), BKE_keyblock_add(), BKE_memfile_undo_encode(), BKE_nurb_valid_message(), BKE_packedfile_compare_to_file(), BKE_ptcache_load_external(), BKE_ptcache_update_info(), BKE_tracking_get_rna_path_for_plane_track(), BKE_tracking_get_rna_path_for_track(), BKE_tracking_get_rna_path_prefix_for_plane_track(), BKE_tracking_get_rna_path_prefix_for_track(), BKE_unit_replace_string(), blend_to_default_draw_status_header(), blend_to_neighbor_draw_status_header(), blender_version_decimal(), blender_version_init(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), BLI_filelist_entry_owner_to_string(), BLI_path_frame(), BLI_path_frame_range(), BLI_uniquename_cb(), bli_windows_get_module_version(), blo_do_versions_280(), blo_do_versions_pre250(), BLO_write_file(), block_create__close_file_dialog(), boid_new_state(), bone_autoside_name(), BPY_driver_exec(), BPY_modules_load_user(), bpy_text_filepath_get(), breakdown_draw_status_header(), camera_multiview_advanced(), blender::gpu::MTLFrameBuffer::check(), blender::gpu::GLFrameBuffer::check(), blender::deg::color_for_pointer(), copy_particle_systems_to_object(), blender::ed::space_node::create_inspection_string_for_geometry(), curve_rename_fcurves(), customdata_version_242(), datadropper_id_sample_pt(), decimate_draw_status(), do_history(), do_version_layers_to_collections(), do_versions_after_linking_280(), do_versions_nodetree_multi_file_output_format_2_62_1(), draw_grid_unit_name(), draw_marker_texts(), draw_property_for_socket(), draw_seq_text_get_source(), DRW_cdlayer_attr_aliases_add(), drw_curves_get_attribute_sampler_name(), DRW_stats_draw(), ED_id_action_ensure(), ed_marker_add_exec(), ed_marker_move_update_header(), ED_region_cache_draw_curfra_label(), ED_scene_draw_fps(), ED_slider_status_string_get(), edbm_bevel_update_status_text(), edbm_inset_update_header(), EEVEE_lightcache_info_update(), EEVEE_lightprobes_init(), EEVEE_render_cache(), EEVEE_render_draw(), EEVEE_render_init(), AnimationImporter::evaluate_animation(), DocumentExporter::exportCurrentScene(), blender::draw::extract_tan_init_common(), filelist_get_details_column_string(), filter_panel_id_fn(), blender::compositor::ExecutionGroup::finalize_chunk_execution(), fmodifier_panel_register(), fmodifier_subpanel_register(), fsmenu_read_system(), generator_panel_draw(), get_current_time_str(), get_default_texture_layer_name_for_object(), get_path_local_ex(), get_proxy_filepath(), get_proxy_fname(), get_rna_access(), ArmatureImporter::get_rna_path_for_joint(), get_tc_filename(), getname_anim_fcurve(), gpencil_interpolate_status_indicators(), gpencil_modifier_subpanel_register(), gpencil_primitive_status_indicators(), gpencil_sculpt_brush_header_set(), gpencil_uv_transform_update_header(), gpu_node_graph_add_texture(), GPU_offscreen_create(), GPU_shader_create_from_arrays_impl(), GPU_vertformat_multiload_enable(), graph_draw_driver_settings_panel(), graph_fmodifier_panel_id(), blender::compositor::DebugInfo::graphviz(), headerBoneSize(), headerResize(), headerSeqSlide(), headerTimeScale(), headerTimeSlide(), headerTimeTranslate(), blender::deg::IDNode::identifier(), IMB_anim_absolute(), IMB_exr_channel_rect(), imb_exr_insert_view_name(), imb_exr_multilayer_parse_channels_from_file(), IMB_exr_set_channel(), blender::draw::init_vbo_for_attribute(), ipo_to_animdata(), keymap_handler_log_kmi_op_str(), knife_update_header(), knifetool_draw_angle(), knifetool_draw_visible_distances(), loopcut_modal(), make_socket_interface(), blender::draw::mesh_extract_uv_format_init(), meshdeform_matrix_solve(), minimize_stretch_iteration(), modifier_subpanel_register(), mtex_adrcodes_to_paths(), multires_external_save_invoke(), new_folder_path(), Freestyle::BlenderStrokeRenderer::NewMesh(), nla_fmodifier_panel_id(), blender::ed::space_node::node_buts_image_user(), blender::ed::space_node::node_find_create_label(), node_replace_undefined_types(), nodeRemoveNode(), ntreeCompositCryptomatteAddSocket(), objfnt_to_ftvfontdata(), outliner_draw_iconrow_number(), outputNumInput(), OVERLAY_edit_uv_cache_init(), panel_draw(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), particles_fluid_step(), path_drop_copy(), playanim_toscreen(), point_normals_update_header(), pose_slide_draw_status(), poselib_blend_apply(), poselib_preview_apply(), poselib_sanitize_exec(), ptcache_filename(), ptcache_path(), PyC_ObSpitStr(), pyrna_enum_to_py(), pyrna_func_error_prefix(), radial_control_paint_cursor(), radial_control_update_header(), RE_engine_update_stats(), reconstruct_update_solve_cb(), render_result_exr_file_cache_path(), RNA_path_append(), ruler_item_as_string(), sample_color_update_header(), scene_ensure_depsgraph_p(), scene_render_name_get(), screen_state_to_nonnormal(), SEQ_channels_ensure(), seq_multiview_name(), seq_open_anim_file(), seq_proxy_get_custom_file_fname(), seq_proxy_get_fname(), seq_sound_proxy_update_cb(), seqbase_unique_name(), sequencer_image_seq_reserve_frames(), sequencer_slip_update_header(), setNearestAxis3d(), setUserConstraint(), shaderfx_subpanel_register(), shapekey_adrcodes_to_paths(), sig_handle_crash(), skin_armature_bone_create(), slider_draw(), stats_row(), stitch_update_header(), template_ID_search_menu_item_tooltip(), template_texture_user_menu(), thumb_create_ex(), thumbpathname_from_uri(), tracking_dopesheet_channels_calc(), AnimationImporter::translate_animation_OLD(), translate_dist_to_str(), ui_block_colorpicker(), ui_but_add_shortcut(), ui_but_copy_menu(), ui_but_copy_popover(), UI_but_online_manual_id(), ui_but_pie_direction_string(), ui_but_string_get_ex(), ui_but_update_ex(), ui_imageuser_slot_menu(), blender::ed::space_node::ui_node_menu_column(), blender::ed::space_node::ui_node_sock_name(), UI_pie_menu_begin(), ui_popup_context_menu_for_panel(), UI_popup_menu_begin_ex(), UI_popup_menu_reports(), ui_template_list_layout_draw(), ui_update_color_picker_buts_rgb(), uiblock_layer_pass_buttons(), uiDefAutoButR(), uiTemplateImageInfo(), uiTemplateMovieclipInformation(), uiTemplatePreview(), uiTemplateRunningJobs(), unpack_all_invoke(), unpack_generate_paths(), unpack_menu(), uri_from_filename(), validate_array_type(), version_geometry_nodes_add_attribute_input_settings(), vgroup_duplicate(), view_to_string__frame_number(), view_to_string__value(), widget_draw_text(), wm_autosave_location(), WM_uilisttype_to_full_list_id(), WM_window_modal_keymap_status_draw(), wm_window_title(), WM_xr_actionmap_binding_ensure_unique(), WM_xr_actionmap_ensure_unique(), and WM_xr_actionmap_item_ensure_unique().

◆ BLI_snprintf_rlen()

size_t BLI_snprintf_rlen ( char *__restrict  dst,
size_t  maxncpy,
const char *__restrict  format,
  ... 
)

◆ BLI_sprintfN()

size_t size_t char* BLI_sprintfN ( const char *__restrict  format,
  ... 
)

Print formatted string into a newly MEM_mallocN'd string and return it.

Referenced by action_flip_pchan_rna_paths(), add_driver_with_target(), anim_change_prop_name(), animpath_update_basepath(), BKE_action_fix_paths_rename(), BKE_animdata_fix_paths_rename(), BKE_animsys_fix_rna_path_rename(), BKE_collection_new_name_get(), BKE_id_to_unique_string_key(), BKE_linestyle_path_to_color_ramp(), blf_display_name(), BLT_lang_set(), build_pict_list_ex(), create_lineset_handler(), do_version_hue_sat_node(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), draw_channel_widget_lock(), draw_channel_widget_mute(), ED_object_ot_drop_named_material_tooltip(), fcurve_path_rename(), filelist_readjob_list_lib_add_datablock(), getname_anim_fcurve(), gpencil_bake_grease_pencil_animation_exec(), layer_new_name_get(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::node_geo_store_named_attribute_cc::node_geo_exec(), pose_slide_apply_quat(), pose_slide_apply_vec3(), progress_tooltip_func(), blender::io::gpencil::GpencilImporterSVG::read(), replace_bbone_len_scale_rnapath(), RNA_path_from_ID_to_property_index(), RNA_path_full_ID_py(), RNA_path_full_property_py_ex(), RNA_path_full_struct_py(), RNA_path_property_py(), RNA_path_struct_property_py(), rna_prepend_real_ID_path(), rna_property_override_property_real_id_owner(), seq_convert_transform_crop(), seq_convert_transform_crop_2(), seq_speed_factor_fix_rna_path(), set_brush_rc_props(), UI_context_copy_to_selected_list(), ui_drop_material_tooltip(), ui_tooltip_data_from_button_or_extra_icon(), ui_tooltip_data_from_gizmo(), ui_tooltip_data_from_tool(), uilist_item_tooltip_func(), update_mapping_node_fcurve_rna_path_callback(), update_mapping_node_inputs_and_properties(), version_node_socket_index_animdata(), vertex_group_lock_description(), wm_open_mainfile_description(), WM_prop_pystring_assign(), and wm_prop_pystring_from_context().

◆ BLI_str_endswith()

bool BLI_str_endswith ( const char *__restrict  str,
const char *__restrict  end 
)

Find if a string ends with another string.

Parameters
strThe string to search within.
endThe string we look for at the end.
Returns
If str ends with end.

Definition at line 887 of file string.c.

References BLI_strn_endswith(), and str.

Referenced by check_valid_camera_multiview(), blender::ed::asset::index::AssetLibraryIndex::init_unused_index_files(), menu_items_from_ui_create(), replace_bbone_len_scale_rnapath(), replace_bbone_scale_rnapath(), sequencer_fcurves_targets_color_strip(), update_mapping_node_fcurve_rna_path_callback(), and WM_keymap_poll().

◆ BLI_str_escape()

size_t size_t char size_t BLI_str_escape ( char *__restrict  dst,
const char *__restrict  src,
size_t  dst_maxncpy 
)

This roughly matches C and Python's string escaping with double quotes - ".

Since every character may need escaping, it's common to create a buffer twice as large as the input.

Parameters
dstThe destination string, at least dst_maxncpy, typically (strlen(src) * 2) + 1.
srcThe un-escaped source string.
dst_maxncpyThe maximum number of bytes allowable to copy.
Note
This is used for creating animation paths in blend files.

Definition at line 250 of file string.c.

References BLI_assert, Freestyle::c, ELEM, len, src, UNLIKELY, and void.

Referenced by action_flip_pchan(), action_flip_pchan_rna_paths(), add_attribute_search_or_value_buttons(), bc_enable_fcurves(), BKE_action_fix_paths_rename(), BKE_animdata_fix_paths_rename(), BKE_animsys_fix_rna_path_rename(), BKE_linestyle_path_to_color_ramp(), BKE_tracking_get_rna_path_for_plane_track(), BKE_tracking_get_rna_path_for_track(), BKE_tracking_get_rna_path_prefix_for_plane_track(), BKE_tracking_get_rna_path_prefix_for_track(), bpy_escape_identifier(), do_version_hue_sat_node(), draw_property_for_output_socket(), draw_property_for_socket(), drw_uniform_attribute_lookup(), get_rna_access(), ArmatureImporter::get_rna_path_for_joint(), nodeRemoveNode(), RNA_path_append(), RNA_path_from_ID_to_property_index(), RNA_path_full_ID_py(), RNA_path_property_py(), RNA_property_as_string(), seq_convert_transform_crop(), seq_convert_transform_crop_2(), seq_speed_factor_fix_rna_path(), sequencer_rna_path_prefix(), shapekey_adrcodes_to_paths(), StringEscape::testEscapeWords(), update_mapping_node_fcurve_rna_path_callback(), update_mapping_node_inputs_and_properties(), version_liboverride_rnacollections_insertion_object(), and version_node_socket_index_animdata().

◆ BLI_str_escape_find_quote()

const char* BLI_str_escape_find_quote ( const char *  str)

Find the first un-escaped quote in the string (to find the end of the string).

Parameters
strTypically this is the first character in a quoted string. Where the character before *str would be ".
Returns
The pointer to the first un-escaped quote.

Definition at line 341 of file string.c.

References NULL, and str.

Referenced by action_flip_pchan_rna_paths(), BLI_str_quoted_substr_range(), and rna_path_token_in_brackets().

◆ BLI_str_format_byte_unit()

void BLI_str_format_byte_unit ( char  dst[15],
long long int  bytes,
bool  base_10 
)

Format a size in bytes using binary units. 1000 -> 1 KB Number of decimal places grows with the used unit (e.g. 1.5 MB, 1.55 GB, 1.545 TB).

Parameters
dstThe resulting string. Dimension of 14 to support largest possible value for bytes (#LLONG_MAX).
bytesNumber to format.
base_10Calculate using base 10 (GB, MB, ...) or 2 (GiB, MiB, ...).

Definition at line 1132 of file string.c.

References ARRAY_SIZE, BLI_snprintf_rlen(), BLI_STATIC_ASSERT, BLI_str_rstrip_float_zero(), BLI_strncpy(), fabs(), len, MAX2, and order.

Referenced by BKE_ptcache_update_info(), BLI_filelist_entry_size_to_string(), ED_info_statusbar_string_ex(), EEVEE_lightcache_info_update(), blender::HashTableStats::print(), blender::Vector< T, InlineBufferCapacity, Allocator >::print_stats(), and TEST().

◆ BLI_str_format_decimal_unit()

void BLI_str_format_decimal_unit ( char  dst[7],
int  number_to_format 
)

Format a count to up to 6 places (plus '\0' terminator) string using long number names abbreviations. Used to produce a compact representation of large numbers.

1 -> 1 15 -> 15 155 -> 155 1555 -> 1.6K 15555 -> 15.6K 155555 -> 156K 1555555 -> 1.6M 15555555 -> 15.6M 155555555 -> 156M 1000000000 -> 1B ...

Length of 7 is the maximum of the resulting string, for example, -15.5K\0.

Definition at line 1158 of file string.c.

References ARRAY_SIZE, BLI_snprintf(), fabsf, and order.

Referenced by blender::ed::spreadsheet::GeometryDataSetTreeViewItem::build_row(), and TEST().

◆ BLI_str_format_int_grouped()

size_t BLI_str_format_int_grouped ( char  dst[16],
int  num 
)

Format ints with decimal grouping. 1000 -> 1,000

Parameters
dstThe resulting string
numNumber to format
Returns
The length of dst

Definition at line 1114 of file string.c.

References BLI_str_format_int_grouped_ex(), and src.

Referenced by BKE_ptcache_update_info(), blender::ed::space_node::create_inspection_string_for_geometry(), outliner_draw_userbuts(), spreadsheet_footer_region_draw(), and TEST().

◆ BLI_str_format_uint64_grouped()

size_t BLI_str_format_uint64_grouped ( char  dst[16],
uint64_t  num 
)

Format uint64_t with decimal grouping. 1000 -> 1,000

Parameters
dstThe resulting string
numNumber to format
Returns
The length of dst

Definition at line 1122 of file string.c.

References BLI_str_format_int_grouped_ex(), PRIu64, and src.

◆ BLI_str_index_in_array()

int BLI_str_index_in_array ( const char *__restrict  str,
const char **__restrict  str_array 
)

Return index of a string in a string array.

Parameters
strThe string to find.
str_arrayArray of strings, (must be NULL-terminated).
Returns
The index of str in str_array or -1.

Definition at line 847 of file string.c.

References str, and STREQ.

Referenced by bpyunits_validate().

◆ BLI_str_index_in_array_n()

int BLI_str_index_in_array_n ( const char *__restrict  str,
const char **__restrict  str_array,
int  str_array_len 
)

Return index of a string in a string array.

Parameters
strThe string to find.
str_arrayArray of strings.
str_array_lenThe length of the array, or -1 for a NULL-terminated array.
Returns
The index of str in str_array or -1.

Definition at line 832 of file string.c.

References str, and STREQ.

◆ BLI_str_partition()

size_t BLI_str_partition ( const char *  str,
const char  delim[],
const char **  sep,
const char **  suf 
)

Find the first char matching one of the chars in delim, from left.

Parameters
strThe string to search within.
delimThe set of delimiters to search for, as unicode values.
sepReturn value, set to the first delimiter found (or NULL if none found).
sufReturn value, set to next char after the first delimiter found (or NULL if none found).
Returns
The length of the prefix (i.e. *sep - str).

Definition at line 989 of file string.c.

References BLI_str_partition_ex(), NULL, and str.

Referenced by passtype_from_name(), and TEST().

◆ BLI_str_partition_ex()

size_t BLI_str_partition_ex ( const char *  str,
const char *  end,
const char  delim[],
const char **  sep,
const char **  suf,
bool  from_right 
)

Find the first char matching one of the chars in delim, either from left or right.

Parameters
strThe string to search within.
endIf non-NULL, the right delimiter of the string.
delimThe set of delimiters to search for, as unicode values.
sepReturn value, set to the first delimiter found (or NULL if none found).
sufReturn value, set to next char after the first delimiter found (or NULL if none found).
from_rightIf true, search from the right of str, else, search from its left.
Returns
The length of the prefix (i.e. *sep - str).

Referenced by imb_exr_split_token(), and TEST().

◆ BLI_str_quoted_substr()

bool bool BLI_str_quoted_substr ( const char *__restrict  str,
const char *__restrict  prefix,
char *  result,
size_t  result_maxlen 
)

Fills result with text within "" that appear after some the contents of prefix. i.e. for string pose["apples"] with prefix pose[, it will return apples.

Parameters
stris the entire string to chop.
prefixis the part of the string to step over.
resultThe buffer to fill.
result_maxlenThe maximum size of the buffer (including nil terminator).
Returns
True if the prefix was found and the entire quoted string was copied into result.

Assume that the strings returned must be freed afterwards, and that the inputs will contain data we want.

Definition at line 424 of file string.c.

References BLI_str_quoted_substr_range(), BLI_str_unescape_ex(), result, and str.

Referenced by animchan_sync_fcurve_scene(), autokeyframe_pose(), blender::bke::BKE_action_find_fcurves_with_bones(), BKE_fcurves_filter(), clear_anim_v3d_exec(), copy_animedit_keys(), delete_key_v3d_without_keying_set(), BCAnimationCurve::get_animation_name(), getname_anim_fcurve(), pose_select_same_keyingset(), and skip_fcurve_selected_data().

◆ BLI_str_quoted_substr_range()

bool BLI_str_quoted_substr_range ( const char *__restrict  str,
const char *__restrict  prefix,
int *__restrict  r_start,
int *__restrict  r_end 
)

Return the range of the quoted string (excluding quotes) str after prefix.

A version of #BLI_str_quoted_substrN that calculates the range instead of un-escaping and allocating the result.

Parameters
strString potentially including prefix.
prefixQuoted string prefix.
r_startThe start of the quoted string (after the first quote).
r_endThe end of the quoted string (before the last quote).
Returns
True when a quoted string range could be found after prefix.

Referenced by flip_names().

◆ BLI_str_replace_char()

void BLI_str_replace_char ( char *  str,
char  src,
char  dst 
)

◆ BLI_str_replace_table_exact()

bool BLI_str_replace_table_exact ( char *  string,
size_t  string_len,
const char *  replace_table[][2],
int  replace_table_len 
)

Simple exact-match string replacement.

Parameters
replace_tableArray of source, destination pairs.
Note
Larger tables should use a hash table.

Definition at line 513 of file string.c.

References BLI_strncpy(), and STREQ.

Referenced by blo_do_versions_userdef().

◆ BLI_str_replaceN()

char* BLI_str_replaceN ( const char *__restrict  str,
const char *__restrict  substr_old,
const char *__restrict  substr_new 
)

string with all instances of substr_old replaced with substr_new, Returns a copy of the c-string str into a newly MEM_mallocN'd and returns it.

Note
A rather wasteful string-replacement utility, though this shall do for now. Feel free to replace this with an even safe + nicer alternative
Parameters
strThe string to replace occurrences of substr_old in
substr_oldThe text in the string to find and replace
substr_newThe text in the string to find and replace
Return values
Returnsthe duplicated string

Definition at line 448 of file string.c.

References BLI_assert, BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_nappend(), BLI_dynstr_new(), BLI_strdup(), NULL, and str.

Referenced by BKE_image_get_tile_strformat(), do_versions_sequencer_speed_effect_recursive(), blender::nodes::node_fn_replace_string_cc::replace_all(), replace_bbone_easing_rnapath(), and updateDuplicateActionConstraintSettings().

◆ BLI_str_rpartition()

size_t BLI_str_rpartition ( const char *  str,
const char  delim[],
const char **  sep,
const char **  suf 
)

Find the first char matching one of the chars in delim, from right.

Parameters
strThe string to search within.
delimThe set of delimiters to search for, as unicode values.
sepReturn value, set to the first delimiter found (or NULL if none found).
sufReturn value, set to next char after the first delimiter found (or NULL if none found).
Returns
The length of the prefix (i.e. *sep - str).

Definition at line 994 of file string.c.

References BLI_str_partition_ex(), NULL, and str.

Referenced by BKE_scene_multiview_view_prefix_get(), imb_exr_insert_view_name(), and TEST().

◆ BLI_str_rstrip()

void BLI_str_rstrip ( char *  str)

Strip white-space from end of the string.

Definition at line 951 of file string.c.

References str.

Referenced by ED_area_status_text(), and fsmenu_xdg_user_dirs_parse().

◆ BLI_str_rstrip_float_zero()

int BLI_str_rstrip_float_zero ( char *  str,
char  pad 
)

Strip trailing zeros from a float, eg: 0.0000 -> 0.0 2.0010 -> 2.001

Parameters
str
pad
Returns
The number of zeros stripped.

Definition at line 963 of file string.c.

References pad, and str.

Referenced by ANIM_add_driver(), BLI_str_format_byte_unit(), ui_but_copy_numeric_value(), and ui_textedit_begin().

◆ BLI_str_startswith()

bool BLI_str_startswith ( const char *__restrict  str,
const char *__restrict  start 
)

Find if a string starts with another string.

Parameters
strThe string to search within.
startThe string we look for at the start.
Returns
If str starts with start.

Definition at line 860 of file string.c.

References str.

Referenced by blend_header_check_magic(), blendthumb_create_thumb_from_file(), BLI_path_contains(), blo_do_versions_280(), and sequencer_fcurves_targets_color_strip().

◆ BLI_str_tolower_ascii()

void BLI_str_tolower_ascii ( char *  str,
size_t  len 
)

◆ BLI_str_toupper_ascii()

void BLI_str_toupper_ascii ( char *  str,
size_t  len 
)

Definition at line 936 of file string.c.

References BLI_toupper_ascii(), len, and str.

Referenced by WM_operator_bl_idname().

◆ BLI_str_unescape()

size_t BLI_str_unescape ( char *__restrict  dst,
const char *__restrict  src,
size_t  src_maxncpy 
)

See BLI_str_unescape_ex doc-string.

This function makes the assumption that dst always has at least src_maxncpy bytes available.

Use BLI_str_unescape_ex if dst has a smaller fixed size.

Note
This is used for parsing animation paths in blend files (runs often).

Definition at line 327 of file string.c.

References Freestyle::c, len, src, str_unescape_pair(), and UNLIKELY.

Referenced by action_flip_pchan_rna_paths(), bpy_unescape_identifier(), rna_path_token_in_brackets(), and StringEscape::testEscapeWords().

◆ BLI_str_unescape_ex()

size_t BLI_str_unescape_ex ( char *__restrict  dst,
const char *__restrict  src,
size_t  src_maxncpy,
size_t  dst_maxncpy,
bool r_is_complete 
)

This roughly matches C and Python's string escaping with double quotes - ".

The destination will never be larger than the source, it will either be the same or up to half when all characters are escaped.

Parameters
dstThe destination string, at least the size of strlen(src) + 1.
srcThe escaped source string.
src_maxncpyThe maximum number of bytes allowable to copy from src.
dst_maxncpyThe maximum number of bytes allowable to copy into dst.
r_is_completeSet to true when

Definition at line 301 of file string.c.

References Freestyle::c, len, src, str_unescape_pair(), and UNLIKELY.

Referenced by BLI_str_quoted_substr().

◆ BLI_strcasecmp()

int BLI_strcasecmp ( const char *  s1,
const char *  s2 
)

◆ BLI_strcasecmp_natural()

int BLI_strcasecmp_natural ( const char *  s1,
const char *  s2 
)

◆ BLI_strcaseeq()

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 533 of file string.c.

References Freestyle::a, usdtokens::b(), and BLI_strcasecmp().

Referenced by imb_exr_pass_name_from_channel(), imb_exr_split_channel_name(), and ExtraHandler::parseElement().

◆ BLI_strcasestr()

char* BLI_strcasestr ( const char *  s,
const char *  find 
)

◆ BLI_strcmp_ignore_pad()

int BLI_strcmp_ignore_pad ( const char *  str1,
const char *  str2,
char  pad 
)

Like strcmp, but will ignore any heading/trailing pad char for comparison. So e.g. if pad is '*', 'world' and 'world' will compare equal.

Definition at line 786 of file string.c.

References pad, and ret.

Referenced by filelist_setfilter_options().

◆ BLI_strcpy_rlen()

size_t BLI_strcpy_rlen ( char *__restrict  dst,
const char *__restrict  src 
)

◆ BLI_strdup()

char* BLI_strdup ( const char *  str)

Duplicates the cstring str into a newly mallocN'd string and returns it.

Parameters
strThe string to be duplicated
Return values
Returnsthe duplicated string

Definition at line 42 of file string.c.

References BLI_strdupn(), and str.

Referenced by actkeys_paste_description(), add_driver_with_target(), alloc_driver_fcurve(), animsys_blend_in_fcurves(), asset_clear_get_description(), asset_view_item_but_drag_set(), BKE_appdir_app_templates(), BKE_bpath_foreach_path_allocated_process(), BKE_collection_new_name_get(), BKE_gpencil_modifier_set_error(), BKE_id_to_unique_string_key(), BKE_keyingset_add_path(), BKE_lib_override_library_property_get(), BKE_lib_override_library_property_operation_get(), BKE_modifier_set_error(), BKE_modifier_set_warning(), BKE_object_sync_to_original(), BKE_packedfile_unpack_to_file(), BKE_paint_canvas_key_get(), BKE_previewimg_cached_ensure(), BKE_previewimg_cached_thumbnail_read(), BKE_render_result_stamp_data(), bke_view_layer_verify_aov_cb(), BLF_dir_add(), BLF_dir_get(), blf_dir_metrics_search(), blf_dir_search(), blf_font_new(), blf_font_new_from_mem(), bli_builddir(), BLI_cpu_brand_string(), BLI_filename_make_safe_ex(), BLI_str_replaceN(), BLO_blendhandle_get_datablock_names(), BLO_blendhandle_get_linkable_groups(), BLT_lang_init(), BLT_lang_locale_explode(), BMO_op_vinitf(), build_pict_list_ex(), collection_drop_tooltip(), console_lb_add_str__internal(), curves_copy_data(), blender::bke::curves_copy_parameters(), data_transfer_get_description(), datastack_drop_tooltip(), decimate_desc(), draw_channel_widget_tooltip(), dropbox_tooltip(), ED_action_fcurve_ensure(), ED_armature_join_objects_exec(), ED_fsmenu_entry_set_path(), ED_gpencil_join_objects_exec(), ED_image_save_all_modified_info(), ED_object_ot_drop_named_material_tooltip(), ED_spreadsheet_context_path_set_geometry_node(), edbm_select_mode_get_description(), eevee_get_frag(), file_draw_icon(), file_draw_preview(), file_draw_tooltip_func(), file_execute(), fileentry_uiname(), filelist_file_create_entry(), filelist_readjob_list_lib_add_datablock(), filelist_readjob_list_lib_group_create(), filelist_readjob_list_lib_navigate_to_parent_entry_create(), filelist_readjob_main_assets_add_items(), filelist_readjob_recursive_dir_add_items(), folderlist_pushdir(), fsmenu_insert_entry(), fsmenu_xdg_user_dirs_parse(), graphkeys_paste_description(), headerTranslation(), icu_to_fcurves(), idprop_ui_data_update_base(), idprop_ui_data_update_string(), IMB_anim_index_rebuild_context(), IMB_thumb_path_lock(), blender::gpu::GPUPlatformGlobal::init(), lib_override_library_property_copy(), lib_override_library_property_operation_copy(), MOD_nodes_update_interface(), modifier_apply_as_shapekey_get_description(), AnimationImporter::modify_fcurve(), blender::ed::space_node::named_attribute_tooltip(), blender::ed::space_node::node_socket_get_tooltip(), object_curves_empty_hair_add_exec(), pyop_poll_message_get_fn(), pyrna_struct_anim_args_parse_ex(), RE_engine_set_error_message(), RNA_path_from_ID_to_struct(), RNA_path_property_py(), RNA_path_resolve_from_type_to_property(), RNA_path_struct_property_py(), RNA_pointer_as_string(), rna_pointer_as_string__bldata(), RNA_pointer_as_string_keywords_ex(), rna_prepend_real_ID_path(), run_string_handle_error(), screen_opengl_render_description(), sequencer_add_effect_strip_desc(), shape_key_remove_get_description(), blender::ed::spreadsheet::spreadsheet_column_assign_runtime_data(), blender::ed::spreadsheet::spreadsheet_column_copy(), blender::ed::spreadsheet::spreadsheet_column_id_copy(), blender::ed::spreadsheet::spreadsheet_context_modifier_copy(), blender::ed::spreadsheet::spreadsheet_context_node_copy(), str_ghash_tests(), strip_last_slash(), blender::ed::curves::surface_set::surface_set_exec(), blender::bke::tests::TEST_F(), text_convert_whitespace_exec(), text_copy_data(), text_save_as_exec(), track_markers_desc(), ui_apply_but_TEX(), ui_but_add_shortcut(), ui_but_convert_to_unit_alt_name(), UI_but_extra_icon_string_info_get(), ui_but_rna_menu_convert_to_menu_type(), ui_but_rna_menu_convert_to_panel_type(), ui_but_string_get_dynamic(), UI_but_string_info_get(), ui_rna_collection_search_update_fn(), ui_tooltip_data_from_button_or_extra_icon(), ui_tooltip_data_from_gizmo(), ui_tooltip_data_from_search_item_tooltip_data(), ui_tooltip_data_from_tool(), UI_view_item_drop_tooltip(), uiItemFullOMenuHold_ptr(), uilist_filter_items_default(), UNUSED_FUNCTION_WITH_RETURN_TYPE(), version_idproperty_move_data_string(), version_idproperty_ui_data(), version_liboverride_rnacollections_insertion_object(), version_liboverride_rnacollections_insertion_object_constraints(), view3d_object_data_drop_tooltip(), volume_grid_cache_get(), WM_context_path_resolve_property_full(), WM_drag_add_asset_list_item(), wm_history_file_new(), wm_history_file_read(), wm_link_append_exec(), WM_operatortype_description(), WM_operatortype_description_or_name(), and wm_save_as_mainfile_get_description().

◆ BLI_strdupcat()

char* BLI_strdupcat ( const char *__restrict  str1,
const char *__restrict  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 47 of file string.c.

References MEM_mallocN, and str.

Referenced by BLT_lang_locale_explode(), GPU_shader_create_from_python(), and replace_bbone_scale_rnapath().

◆ BLI_strdupn()

char* BLI_strdupn ( const char *  str,
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 33 of file string.c.

References len, MEM_mallocN, and str.

Referenced by BKE_nlastrip_validate_fcurves(), BLI_file_read_as_lines(), BLI_strdup(), block_create__close_file_dialog(), BLT_lang_locale_explode(), BLT_lang_set(), console_lb_add__internal(), do_version_fcurve_hide_viewport_fix(), fsmenu_insert_entry(), ibJpegImageFromCinfo(), memiter_words10k_test(), blender::ed::space_node::node_errors_tooltip_fn(), TEST(), text_autocomplete_build(), txt_insert_buf(), ui_but_string_get_dynamic(), UI_but_string_info_get(), ui_number_from_string_factor(), ui_number_from_string_percentage(), and ui_textedit_begin().

◆ BLI_string_all_words_matched()

bool BLI_string_all_words_matched ( const char *  name,
const char *  str,
int(*)  words[2],
int  words_len 
)

Definition at line 576 of file string.c.

References BLI_string_has_word_prefix(), and str.

Referenced by operator_search_update_fn().

◆ BLI_string_find_split_words()

int BLI_string_find_split_words ( const char *  str,
size_t  len,
char  delim,
int  r_words[][2],
int  words_max 
)

Find the ranges needed to split str into its individual words.

Parameters
strThe string to search for words.
lenSize of the string to search.
delimCharacter to use as a delimiter.
r_wordsInfo about the words found. Set to [index, len] pairs.
words_maxMax number of words to find
Returns
The number of words found in str

Definition at line 1049 of file string.c.

References len, and str.

Referenced by name_matches_dopesheet_filter(), operator_search_update_fn(), and StringFindSplitWords::testStringFindSplitWords().

◆ BLI_string_has_word_prefix()

bool BLI_string_has_word_prefix ( const char *  haystack,
const char *  needle,
size_t  needle_len 
)

◆ BLI_string_max_possible_word_count()

size_t int BLI_string_max_possible_word_count ( int  str_len)

Definition at line 559 of file string.c.

Referenced by name_matches_dopesheet_filter(), operator_search_update_fn(), and TEST().

◆ BLI_strn_endswith()

bool BLI_strn_endswith ( const char *__restrict  str,
const char *__restrict  end,
size_t  length 
)

◆ BLI_strncasecmp()

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

Definition at line 646 of file string.c.

References len.

Referenced by BLI_strcasestr(), BLI_strncasestr(), texttool_suggest_add(), and texttool_suggest_prefix().

◆ BLI_strncasestr()

char* BLI_strncasestr ( const char *  s,
const char *  find,
size_t  len 
)

Variation of BLI_strcasestr with string length limited to len

Definition at line 592 of file string.c.

References BLI_strncasecmp(), Freestyle::c, len, and NULL.

Referenced by BLI_string_has_word_prefix(), name_matches_dopesheet_filter(), and TEST().

◆ BLI_strncpy()

char* BLI_strncpy ( char *__restrict  dst,
const char *__restrict  src,
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 64 of file string.c.

References BLI_assert, BLI_strnlen(), and src.

Referenced by ABC_export(), ABC_import(), absolute_convert_foreach_path_cb(), acf_filldrivers_name(), acf_generic_idblock_name(), acf_gpl_name(), acf_group_name(), acf_masklay_name(), acf_nla_controls_name(), acf_nlaaction_name(), acf_nlatrack_name(), acf_object_name(), acf_shapekey_name(), acf_summary_name(), action_groups_add_new(), AnimationImporter::add_bone_fcurve(), blender::io::usd::USDGeomReader::add_cache_modifier(), add_driver_with_target(), add_hook_object(), add_new_constraint_internal(), blender::io::alembic::AbcObjectReader::addCacheModifier(), addMatrixSpace(), ANIM_add_driver(), ANIM_channel_debug_print_info(), ANIM_copy_as_driver(), anim_getnew(), ANIM_keyingset_info_register(), blender::io::obj::append_frame_to_filename(), AnimationImporter::apply_matrix_curves(), applyTransformOrientation(), arg_handle_load_file(), arg_handle_output_set(), arg_handle_python_file_run(), armature_autoside_names_exec(), armature_extrude_exec(), asset_metadata_tag_add(), AnimationImporter::Assign_color_animations(), AnimationImporter::Assign_float_animations(), AnimationImporter::Assign_lens_animations(), AnimationImporter::Assign_transform_animations(), blender::ed::space_node::attribute_search_exec_fn(), BKE_addon_ensure(), BKE_appdir_folder_documents(), BKE_appdir_font_folder_default(), BKE_asset_library_find_suitable_root_path_from_path(), BKE_blendfile_append(), BKE_blendfile_link_append_context_item_add(), BKE_blendfile_link_append_context_library_add(), BKE_bpath_foreach_path_allocated_process(), BKE_bpath_foreach_path_dirfile_fixed_process(), BKE_bpath_foreach_path_fixed_process(), BKE_cachefile_add_layer(), BKE_cachefile_eval(), BKE_cachefile_filepath_get(), BKE_collection_new_name_get(), BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_colorspace_settings_init(), BKE_color_managed_display_settings_copy(), BKE_color_managed_display_settings_init(), BKE_color_managed_view_settings_copy(), BKE_constraint_targets_flush(), BKE_cryptomatte_find_name(), BKE_curve_init(), BKE_fluid_modifier_copy(), BKE_freestyle_lineset_add(), BKE_gpencil_layer_addnew(), BKE_gpencil_layer_copy_settings(), BKE_gpencil_layer_mask_add(), BKE_gpencil_modifier_new(), BKE_gpencil_palette_addnew(), BKE_gpencil_palettecolor_addnew(), BKE_id_attribute_calc_unique_name(), BKE_id_new_name_validate(), BKE_image_add_renderslot(), BKE_image_add_tile(), BKE_image_ensure_tile_token(), BKE_image_get_tile_label(), BKE_image_render_write_exr(), BKE_image_save_options_init(), BKE_image_signal(), BKE_image_user_file_path_ex(), BKE_keyblock_add(), BKE_keyblock_copy_settings(), BKE_keyingset_add(), BKE_keyingset_add_path(), BKE_lib_override_library_update(), BKE_libblock_alloc(), BKE_libblock_copy_ex(), BKE_library_filepath_set(), BKE_lightgroup_membership_get(), BKE_lightgroup_membership_set(), BKE_main_library_weak_reference_add_item(), BKE_main_namemap_get_name(), BKE_main_namemap_remove_name(), BKE_mask_layer_copy(), BKE_mask_layer_new(), BKE_mask_layer_rename(), BKE_mask_new(), BKE_memfile_undo_decode(), BKE_memfile_undo_encode(), BKE_modifier_copy_ex(), BKE_movieclip_file_add(), BKE_movieclip_file_add_exists_ex(), BKE_movieclip_filename_for_frame(), BKE_nla_action_stash(), BKE_nlastrip_validate_name(), BKE_node_clipboard_add_node(), BKE_object_copy_gpencil_modifier(), BKE_object_copy_modifier(), BKE_object_defgroup_new(), BKE_object_facemap_add_name(), BKE_object_modifier_stack_copy(), BKE_object_workob_calc_parent(), BKE_packedfile_compare_to_file(), BKE_packedfile_new(), BKE_packedfile_unpack_image(), BKE_packedfile_unpack_sound(), BKE_packedfile_unpack_to_file(), BKE_packedfile_unpack_vfont(), BKE_packedfile_unpack_volume(), BKE_pose_add_group(), BKE_pose_channel_ensure(), BKE_preferences_asset_library_add(), BKE_preferences_asset_library_path_set(), BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_load_external(), BKE_ptcache_update_info(), BKE_scene_add_render_view(), BKE_scene_disable_color_management(), BKE_scene_multiview_filepath_get(), BKE_scene_multiview_view_filepath_get(), BKE_scene_multiview_view_prefix_get(), BKE_shaderfx_new(), BKE_sim_debug_data_add_element(), BKE_sound_new_file(), BKE_sound_new_file_exists_ex(), BKE_studiolight_init(), BKE_text_file_modified_check(), BKE_text_file_modified_ignore(), BKE_text_load_ex(), BKE_text_reload(), BKE_tracking_get_rna_path_prefix_for_plane_track(), BKE_tracking_get_rna_path_prefix_for_track(), BKE_tracking_object_add(), BKE_tracking_reconstruction_check(), BKE_tracking_reconstruction_context_new(), BKE_tracking_reconstruction_report_error_message(), BKE_undosys_step_push_init_with_type(), BKE_undosys_step_push_with_type(), BKE_vfont_load(), BKE_vfont_load_exists_ex(), BKE_view_layer_add_aov(), BKE_view_layer_add_lightgroup(), BKE_view_layer_rename(), BKE_volume_load(), BKE_volume_set_velocity_grid_by_name(), blendfile_library_relocate_remap(), bli_builddir(), BLI_dir_create_recursive(), BLI_filelist_entry_mode_to_string(), BLI_filelist_entry_owner_to_string(), BLI_hostname_get(), BLI_join_dirfile(), BLI_make_file_string(), BLI_path_abs(), BLI_path_abs_from_cwd(), BLI_path_append(), BLI_path_cmp_normalized(), BLI_path_contains(), BLI_path_extension_check_glob(), BLI_path_frame(), BLI_path_frame_range(), BLI_path_frame_strip(), BLI_path_program_search(), BLI_path_rel(), BLI_path_sequence_decode(), BLI_path_suffix(), BLI_path_to_display_name(), BLI_split_dirfile(), BLI_str_format_byte_unit(), BLI_str_replace_table_exact(), BLI_string_flip_side_name(), BLI_string_split_prefix(), BLI_string_split_suffix(), BLI_uniquename_cb(), blo_do_versions_260(), blo_do_versions_270(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_300(), blo_filedata_from_file(), blo_find_main(), BLO_read_from_memfile(), blo_update_defaults_scene(), BLO_update_defaults_startup_blend(), BMO_op_vinitf(), boid_new_rule(), bone_autoside_name(), bone_mouse_select_menu(), bookmark_select_exec(), bpath_list_append(), bpath_list_restore(), bpy_lib_enter(), bpy_lib_load(), bpy_lib_write(), bpyunits_to_value(), brush_add_gpencil_exec(), build_pict_list_ex(), cache_file_init_data(), cachefile_layer_open_invoke(), cachefile_open_exec(), cachefile_open_invoke(), calculatePropRatio(), cdf_layer_add(), blender::bke::tests::change_name(), change_node_socket_name(), cmp_node_image_add_pass_output(), colormanage_check_colorspace_settings(), colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_colorspace_add(), colormanage_display_add(), colormanage_load_config(), colormanage_look_add(), colormanage_role_color_space_name_get(), colormanage_view_add(), colorspace_set_default_role(), constraint_bone_name_fix(), blender::io::usd::USDMaterialReader::convert_usd_primvar_reader_float2(), blender::io::alembic::create_archive(), create_placeholder(), CTX_store_add(), curve_calc_modifiers_post(), customData_add_layer__internal(), CustomData_external_add(), customdata_external_filename(), CustomData_set_layer_name(), CustomData_validate_layer_name(), depthdropper_depth_sample_pt(), detect_clip_source(), direct_link_library(), do_makepicstring(), do_version_constraints_245(), do_versions(), do_versions_compositor_render_passes_storage(), do_versions_node_group_add_socket_2_56_2(), do_versions_nodetree_customnodes(), do_versions_nodetree_file_output_layers_2_64_5(), do_versions_nodetree_multi_file_output_format_2_62_1(), do_versions_nodetree_multi_file_output_path_2_63_1(), do_versions_rename_id(), do_write_image_or_movie(), draw_marker_texts(), draw_movieclip_notes(), draw_seq_text_get_source(), drivers_path_rename_fix(), drw_attributes_add_request(), DRW_draw_region_engine_info(), DRW_pass_create(), DRW_shader_library_add_file(), DRW_stats_draw(), drw_stats_timer_start_ex(), duplicateEditBoneObjects(), dynamicPaint_bakeImageSequence(), dynamicPaint_Modifier_copy(), dynamicPaint_outputSurfaceImage(), dynamicPaintSurface_setUniqueName(), dynamicPaintSurface_updateType(), ED_area_status_text(), ED_armature_bone_rename(), ED_armature_bones_flip_names(), ED_armature_ebone_add(), ED_armature_from_edit(), ED_armature_join_objects_exec(), ED_buttons_search_string_set(), ED_file_change_dir_ex(), ED_fsmenu_entry_set_name(), ED_gpencil_anim_copybuf_copy(), ED_image_filesel_detect_sequences(), ed_marker_duplicate_apply(), ED_node_set_tree_type(), ED_node_tree_push(), ED_node_tree_start(), ED_object_parent(), ED_object_parent_set(), ED_object_shaderfx_copy(), ED_sequencer_select_sequence_single(), ED_workspace_status_text(), EEVEE_lightcache_info_update(), blender::io::obj::export_frame(), external_draw_scene_do_v3d(), blender::draw::extract_tan_init_common(), eyedropper_gpencil_status_indicators(), fcurve_add_to_list(), fcurves_path_rename_fix(), file_browse_exec(), file_directory_enter_handle(), file_directory_new_exec(), file_draw_string(), file_expand_directory(), file_filename_enter_handle(), file_panel_operator_header(), file_path_to_ui_path(), file_rename_state_activate(), file_select_do(), file_select_match(), file_sfile_filepath_set(), filelist_asset_library_path(), filelist_cache_previews_push(), filelist_get_details_column_string(), filelist_readjob_recursive_dir_add_items(), filelist_readjob_start(), filelist_setdir(), filelist_setfilter_options(), filenum_newname(), blender::io::gpencil::GpencilIO::filepath_set(), fileselect_ensure_updated_file_params(), fileselect_file_set(), fileselect_initialize_params_common(), fileselect_refresh_asset_params(), find_bhead_from_code_name(), fix_relpaths_library(), flip_names(), fluid_bake_sequence(), fluid_initjob(), fluid_validatepaths(), fmodifier_panel_register(), fmodifier_subpanel_register(), folderlist_popdir(), blender::gpu::FrameBuffer::FrameBuffer(), fsmenu_entry_generate_name(), fsmenu_insert_entry(), fsmenu_read_bookmarks(), gather_objects_paths(), blender::io::usd::gather_objects_paths(), generator_panel_draw(), blender::io::usd::get_absolute_path(), get_drag_path(), blender::io::obj::get_image_filepath(), get_index_dir(), get_path_system_ex(), get_path_user_ex(), get_proxy_fname(), get_sequence_fname(), blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), Freestyle::StringUtils::getPathName(), Freestyle::BlenderStrokeRenderer::GetStrokeShader(), ghost_event_proc(), gpencil_duplicate_exec(), gpencil_duplicate_points(), gpencil_interpolate_status_indicators(), gpencil_modifier_panel_register(), gpencil_modifier_subpanel_register(), gpencil_primitive_status_indicators(), gpencil_strokes_copy_exec(), GPU_shader_create_info_check_error(), blender::compositor::DebugInfo::graphviz(), groupname_to_code(), hud_panel_operator_redo_draw_header(), icon_preview_imbuf_from_brush(), id_name_final_build(), IDP_AssignString(), idp_generic_copy(), IDP_NewIDPArray(), IDP_NewString(), idriver_to_cdriver(), image_file_browse_invoke(), image_foreach_path(), image_replace_exec(), image_save_post(), image_save_sequence_exec(), image_save_update_filepath(), image_sequence_get_frame_ranges(), IMB_anim_get_fname(), IMB_anim_set_index_dir(), imb_cache_filename(), IMB_colormanagement_check_file_config(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_init_default_view_settings(), IMB_colormanagement_validate_settings(), IMB_exr_add_channel(), IMB_exr_channel_rect(), IMB_exr_get_handle_name(), imb_exr_get_layer(), imb_exr_get_pass(), imb_exr_insert_view_name(), imb_exr_multilayer_parse_channels_from_file(), imb_exr_pass_name_from_channel(), IMB_exr_set_channel(), imb_exr_split_channel_name(), imb_handle_alpha(), IMB_ibImageFromFile(), IMB_ibImageFromMemory(), IMB_index_builder_create(), IMB_indexer_open(), imb_load_photoshop(), IMB_loadiffname(), IMB_metadata_get_field(), IMB_moviecache_create(), IMB_open_anim(), IMB_suffix_anim(), IMB_testiffname(), IMB_thumb_load_image(), blender::io::stl::importer_main(), blender::nodes::node_composite_planetrackdeform_cc::init(), blender::nodes::node_composite_trackpos_cc::init(), init_iconfile_list(), blender::ed::asset::index::init_indexer_entry_from_value(), blender::nodes::node_composite_output_file_cc::init_output_file(), init_text_effect(), initData(), initLaplacianSystem(), is_hidden_dot_filename(), joined_armature_fix_animdata_cb(), joined_armature_fix_links(), joined_armature_fix_links_constraints(), blender::nodes::node_composite_moviedistortion_cc::label(), layer_new_name_get(), lib_id_library_local_paths_callback(), lib_weak_key_create(), library_link_end(), load_data_init_from_operator(), Freestyle::Controller::LoadMesh(), M_imbuf_load(), main(), main_namemap_populate(), main_namemap_validate_and_fix(), make_boneList_recursive(), make_object_duplilist_real(), make_socket(), make_socket_interface(), make_socket_type_virtual(), make_standard_socket_type(), mask_parent_set_exec(), merged_element_search_fn_recursive(), mesh_calc_finalize(), mesh_new_from_mesh(), meshcache_do(), missing_files_find__recursive(), missing_files_find_foreach_path_cb(), ml_addlayer_cb(), ml_addpass_cb(), ml_addview_cb(), modifier_allocate_and_init(), modifier_panel_register(), modifier_subpanel_register(), blender::nodes::decl::modify_subtype_except_for_storage(), movieclip_open_anim_file(), namebutton_fn(), new_folder_path(), new_modifier(), node_blend_label(), blender::nodes::node_fn_boolean_math_cc::node_boolean_math_label(), blender::nodes::node_fn_compare_cc::node_compare_label(), blender::nodes::node_composite_keyingscreen_cc::node_composit_init_keyingscreen(), blender::nodes::node_composite_image_cc::node_composit_init_rlayers(), blender::ed::space_node::node_draw_space(), node_filter_label(), blender::ed::space_node::node_find_create_label(), blender::nodes::node_fn_float_to_int_cc::node_float_to_int_label(), blender::ed::space_node::node_geometry_add_attribute_search_button(), node_group_label(), node_image_label(), node_init(), blender::ed::space_node::node_link_update_header(), blender::nodes::node_composite_mask_cc::node_mask_label(), node_math_label(), node_sock_label(), node_socket_copy_default_value(), node_type_base(), node_type_base_custom(), node_type_socket_templates(), node_type_storage(), node_vector_math_label(), nodeAddNode(), nodeLabel(), nodeModifySocketType(), ntreeAddTree(), ntreeCompositCryptomatteLayerPrefix(), object_add_or_copy_particle_system(), object_copy_data(), object_mouse_select_menu(), object_speaker_add_exec(), open_invoke(), operator_search_update_fn(), outputNumInput(), blender::compositor::OutputOpenExrLayer::OutputOpenExrLayer(), blender::compositor::OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(), blender::compositor::OutputSingleLayerOperation::OutputSingleLayerOperation(), blender::compositor::OutputStereoOperation::OutputStereoOperation(), panel_add_instanced(), blender::io::obj::OBJParser::parse(), particle_batch_cache_ensure_procedural_strand_data(), blender::io::path_reference(), 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(), preview_prepare_scene(), ptcache_frame_from_filename(), pyrna_py_to_prop(), RE_bake_engine(), RE_create_gp_pass(), RE_engine_render(), RE_engine_update_stats(), RE_NewRender(), RE_SetActiveRenderView(), read_global(), read_library_file_data(), blender::io::usd::USDXformReader::read_object_data(), register_undefined_types(), relative_convert_foreach_path_cb(), relative_rebase_foreach_path_cb(), renamebutton_cb(), render_layer_add_pass(), render_result_exr_file_cache_path(), render_result_new(), render_result_view_new(), render_result_views_shallowcopy(), blender::ed::space_node::reroute_node_draw(), return_editmesh_vgroup(), RNA_parameter_list_create(), RNA_property_string_get_default(), RNA_struct_state_owner_set(), save_image_op(), scene_init_data(), screen_opengl_views_setup(), screenshot_invoke(), sculpt_save_active_attribute(), sculpt_undo_alloc_node_type(), sculpt_undo_bmesh_push(), sculpt_undo_face_sets_push(), SCULPT_undo_push_node(), SEQ_add_image_load_file(), SEQ_add_image_set_directory(), SEQ_add_image_strip(), SEQ_add_load_data_init(), SEQ_add_movie_strip(), seq_disk_cache_add_file_to_list(), seq_disk_cache_add_header_entry(), seq_disk_cache_get_dir(), seq_disk_cache_get_files(), seq_disk_cache_get_project_dir(), seq_disk_cache_handle_versioning(), SEQ_edit_sequence_swap(), SEQ_modifier_new(), seq_open_anim_file(), seq_proxy_get_custom_file_fname(), seq_proxy_get_fname(), seq_proxy_index_dir_set(), SEQ_sequence_base_unique_name_recursive(), sequence_guess_offset(), sequencer_add_movie_multiple_strips(), sequencer_add_sound_multiple_strips(), sequencer_change_path_exec(), sequencer_export_subtitles_invoke(), sequencer_generic_invoke_path__internal(), sequencer_image_seq_reserve_frames(), sequencer_select_set_active(), sequencer_separate_images_exec(), set_constraint_nth_target(), BoneExtended::set_name(), blender::compositor::PlaneTrackCommon::set_plane_track_name(), blender::compositor::CompositorOperation::set_scene_name(), blender::compositor::TrackPositionOperation::set_track_name(), blender::compositor::PlaneTrackCommon::set_tracking_object(), blender::compositor::TrackPositionOperation::set_tracking_object(), blender::compositor::KeyingScreenOperation::set_tracking_object(), setAxisMatrixConstraint(), setConstraint(), setError(), setNearestAxis2d(), blender::ed::asset::AssetList::setup(), blender::io::alembic::AbcObjectReader::setupObjectTransform(), blender::gpu::Shader::Shader(), shaderfx_copy_exec(), shaderfx_panel_register(), shaderfx_subpanel_register(), shapekey_adrcodes_to_paths(), smooth_brush_toggle_on(), solve_camera_invoke(), solve_camera_updatejob(), sound_mixdown_exec(), split_groups_action_temp(), blender::gpu::StorageBuf::StorageBuf(), studiolight_add_file(), surface_setUniqueOutputName(), tempdir_session_create(), blender::bke::cryptomatte::tests::TEST(), blender::bke::id::remapper::tests::TEST(), TEST(), blender::bke::tests::TEST(), test_env_path(), blender::bke::tests::TEST_F(), blender::bke::tests::test_render_pass_conflict(), text_find_set_selected_exec(), text_replace_set_selected_exec(), ExtraHandler::textData(), blender::gpu::Texture::Texture(), tracking_dopesheet_channels_calc(), tracks_map_new(), transform_orientations_current_set(), transformcache_copy(), AnimationImporter::translate_animation_OLD(), txt_write_file(), ubuf_from_image_no_tiles(), ui_apply_but_undo(), UI_autocomplete_end(), UI_autocomplete_update_name(), UI_block_begin(), ui_but_anim_expression_get(), ui_but_copy_operator(), ui_but_string_get_ex(), ui_but_string_set(), ui_but_text_password_hide(), ui_but_update_ex(), ui_but_update_old_active_from_new(), ui_draw_menu_item(), ui_draw_preview_item_stateless(), ui_imageuser_slot_menu(), ui_list_ensure(), blender::ed::space_node::ui_node_menu_column(), blender::ed::space_node::ui_node_sock_name(), UI_panel_begin(), ui_panel_category_active_set(), UI_panel_category_add(), ui_pie_menu_level_create(), UI_popup_menu_reports(), UI_search_item_add(), ui_searchbox_apply(), ui_style_new(), ui_textedit_copypaste(), ui_textedit_string_set(), UI_UL_asset_view(), UI_UL_cache_file_layers(), uiblock_layer_pass_buttons(), uiItemMenuEnumFullO_ptr(), uiItemMenuEnumR_prop(), uilist_filter_items_default(), uiStyleInit(), uiTemplateComponentMenu(), uiTemplatePreview(), uiTemplateTextureUser(), undosys_id_ref_store(), blender::gpu::UniformBuf::UniformBuf(), unique_name(), unpack_all_invoke(), unpack_generate_paths(), updateDuplicateSubtarget(), uri_from_filename(), USD_export(), USD_import(), user_string_to_number(), version_switch_node_input_prefix(), vfont_init_data(), vgroup_duplicate(), vgroup_init_remap(), view_lock_to_active_exec(), visit_object(), volume_init_data(), weightvg_do_mask(), what_does_obaction(), where_am_i(), where_is_temp(), WM_drag_create_asset_data(), WM_drag_data_create(), WM_dropboxmap_find(), wm_homefile_read_ex(), WM_init(), WM_jobs_get(), WM_keyconfig_new(), WM_keyconfig_remove(), WM_keyconfig_set_active(), WM_keymap_add_item(), WM_keymap_item_restore_to_default(), wm_keymap_new(), wm_lib_relocate_exec_do(), wm_link_append_exec(), wm_main_playanim_intern(), WM_modalkeymap_add_item_str(), wm_open_mainfile_description(), wm_operator_create(), WM_operatortype_macro_define(), wm_revert_mainfile_exec(), WM_xr_actionmap_binding_ensure_unique(), WM_xr_actionmap_binding_new(), WM_xr_actionmap_ensure_unique(), WM_xr_actionmap_item_ensure_unique(), WM_xr_actionmap_item_new(), WM_xr_actionmap_new(), workspace_layout_name_set(), blender::io::gpencil::GpencilExporterPDF::write(), blender::io::gpencil::GpencilExporterSVG::write(), write_crash_blend(), write_global(), and write_renderinfo().

◆ BLI_strncpy_ensure_pad()

char* BLI_strncpy_ensure_pad ( char *__restrict  dst,
const char *__restrict  src,
char  pad,
size_t  maxncpy 
)

Like BLI_strncpy but ensures dst is always padded by given char, on both sides (unless src is empty).

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

Definition at line 78 of file string.c.

References BLI_assert, BLI_strnlen(), pad, and src.

Referenced by filelist_setfilter_options(), outliner_filter_tree(), and uilist_filter_items_default().

◆ BLI_strncpy_rlen()

size_t BLI_strncpy_rlen ( char *__restrict  dst,
const char *__restrict  src,
size_t  maxncpy 
)

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

Note
This is a duplicate of BLI_strncpy that returns bytes copied. And is a drop in replacement for 'snprintf(str, sizeof(str), "%s", arg);'
Parameters
dstDestination for copy
srcSource string to copy
maxncpyMaximum number of characters to copy (generally the size of dst)
Return values
Thenumber of bytes copied (The only difference from BLI_strncpy).

Definition at line 120 of file string.c.

References BLI_assert, BLI_strnlen(), and src.

Referenced by applyEdgeSlide(), applyShrinkFatten(), applyVertSlide(), BKE_unit_name_to_alt(), BLI_path_extension_check_glob(), BLI_path_join(), BLI_path_rel(), BLI_string_flip_side_name(), event_ids_from_flag(), get_stats_string(), get_thumb_dir(), headerTranslation(), IMB_thumb_load_font_get_hash(), nla_draw_strip_text(), scene_undo_depsgraph_gen_key(), ui_but_drawstr_without_sep_char(), ui_searchbox_region_draw_cb__operator(), uiTemplateImageInfo(), uiTemplateMovieclipInformation(), unpack_generate_paths(), WM_operator_bl_idname(), and WM_operator_py_idname().

◆ BLI_strnlen()

size_t BLI_strnlen ( const char *  str,
size_t  maxlen 
)

◆ BLI_tolower_ascii()

char BLI_tolower_ascii ( const char  c)

Definition at line 917 of file string.c.

References Freestyle::c.

Referenced by BLI_str_tolower_ascii().

◆ BLI_toupper_ascii()

char BLI_toupper_ascii ( const char  c)

Definition at line 922 of file string.c.

References Freestyle::c.

Referenced by BLI_str_toupper_ascii(), brush_add_gpencil_exec(), and imb_exr_split_channel_name().

◆ BLI_vsnprintf()

size_t BLI_vsnprintf ( char *__restrict  buffer,
size_t  maxncpy,
const char *__restrict  format,
va_list  arg 
)

Portable replacement for vsnprintf.

◆ BLI_vsnprintf_rlen()

size_t size_t BLI_vsnprintf_rlen ( char *__restrict  buffer,
size_t  maxncpy,
const char *__restrict  format,
va_list  arg 
)

A version of BLI_vsnprintf that returns strlen(buffer)