|
Blender V4.3
|
#include <stdarg.h>#include <string>#include "BLI_compiler_attrs.h"#include "BLI_function_ref.hh"#include "BLI_string_ref.hh"#include "BLI_utildefines.h"Go to the source code of this file.
Macros | |
| #define | BLI_string_join_by_sep_char_with_tableN(sep, table, ...) |
| #define | _BLI_STRING_ARGS_1 _BLI_STRING_ARGS_0 const char *a |
| #define | _BLI_STRING_ARGS_2 _BLI_STRING_ARGS_1, const char *b |
| #define | _BLI_STRING_ARGS_3 _BLI_STRING_ARGS_2, const char *c |
| #define | _BLI_STRING_ARGS_4 _BLI_STRING_ARGS_3, const char *d |
| #define | _BLI_STRING_ARGS_5 _BLI_STRING_ARGS_4, const char *e |
| #define | _BLI_STRING_ARGS_6 _BLI_STRING_ARGS_5, const char *f |
| #define | _BLI_STRING_ARGS_7 _BLI_STRING_ARGS_6, const char *g |
| #define | _BLI_STRING_ARGS_8 _BLI_STRING_ARGS_7, const char *h |
| #define | _BLI_STRING_ARGS_9 _BLI_STRING_ARGS_8, const char *i |
| #define | _BLI_STRING_ARGS_10 _BLI_STRING_ARGS_9, const char *j |
Typedefs | |
| using | UniquenameCheckCallback = bool (*)(void *arg, const char *name) |
Functions | |
| void void char * | BLI_string_join_array_by_sep_char_with_tableN (char sep, char *table[], const char *strings[], uint strings_num) ATTR_NONNULL(2 |
| size_t | BLI_string_flip_side_name (char *name_dst, const char *name_src, bool strip_number, size_t name_dst_maxncpy) ATTR_NONNULL(1 |
| size_t void | BLI_uniquename_cb (UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(1 |
| size_t void std::string | BLI_uniquename_cb (blender::FunctionRef< bool(blender::StringRef)> unique_check, char delim, blender::StringRef name) |
| void | BLI_uniquename (const struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1 |
| void size_t | BLI_string_len_array (const char *strings[], uint strings_num) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
String Split | |
| size_t | BLI_string_split_name_number (const char *name, char delim, char *r_name_left, int *r_number) ATTR_NONNULL(1 |
| size_t bool | BLI_string_is_decimal (const char *string) ATTR_NONNULL(1) |
| void | BLI_string_split_suffix (const char *string, size_t string_maxlen, char *r_body, char *r_suf) ATTR_NONNULL(1 |
| void void | BLI_string_split_prefix (const char *string, size_t string_maxlen, char *r_pre, char *r_body) ATTR_NONNULL(1 |
Implement: <tt>BLI_string_join(..)</tt> | |
| #define | BLI_string_join(...) VA_NARGS_CALL_OVERLOAD(_BLI_string_join_, __VA_ARGS__) |
| size_t | BLI_string_join_array (char *result, size_t result_maxncpy, const char *strings[], uint strings_num) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_3 (_BLI_STRING_ARGS_1) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_4 (_BLI_STRING_ARGS_2) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_5 (_BLI_STRING_ARGS_3) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_6 (_BLI_STRING_ARGS_4) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_7 (_BLI_STRING_ARGS_5) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_8 (_BLI_STRING_ARGS_6) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_9 (_BLI_STRING_ARGS_7) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_10 (_BLI_STRING_ARGS_8) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_11 (_BLI_STRING_ARGS_9) ATTR_NONNULL() |
| BLI_INLINE size_t | _BLI_string_join_12 (_BLI_STRING_ARGS_10) ATTR_NONNULL() |
Implement: <tt>BLI_string_joinN(..)</tt> | |
| #define | BLI_string_joinN(...) VA_NARGS_CALL_OVERLOAD(_BLI_string_joinN_, __VA_ARGS__) |
| char * | BLI_string_join_arrayN (const char *strings[], uint strings_num) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_1 (_BLI_STRING_ARGS_1) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_2 (_BLI_STRING_ARGS_2) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_3 (_BLI_STRING_ARGS_3) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_4 (_BLI_STRING_ARGS_4) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_5 (_BLI_STRING_ARGS_5) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_6 (_BLI_STRING_ARGS_6) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_7 (_BLI_STRING_ARGS_7) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_8 (_BLI_STRING_ARGS_8) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_9 (_BLI_STRING_ARGS_9) ATTR_NONNULL() |
| BLI_INLINE char * | _BLI_string_joinN_10 (_BLI_STRING_ARGS_10) ATTR_NONNULL() |
String Replace | |
| char | ATTR_MALLOC |
| char * | BLI_string_replaceN (const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1 |
| void | BLI_string_replace_char (char *str, char src, char dst) ATTR_NONNULL(1) |
| bool | BLI_string_replace_table_exact (char *string, size_t string_len, const char *replace_table[][2], int replace_table_len) |
| size_t | BLI_string_replace_range (char *string, size_t string_maxncpy, int src_beg, int src_end, const char *dst) |
| #define _BLI_STRING_ARGS_0 char *__restrict dst, const size_t dst_len, |
Definition at line 210 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_0 |
Definition at line 210 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_0 char *__restrict dst, const size_t dst_len, const char sep, |
Definition at line 210 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_0 const char sep, |
Definition at line 210 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_1 _BLI_STRING_ARGS_0 const char *a |
Definition at line 195 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_10 _BLI_STRING_ARGS_9, const char *j |
Definition at line 204 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_2 _BLI_STRING_ARGS_1, const char *b |
Definition at line 196 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_3 _BLI_STRING_ARGS_2, const char *c |
Definition at line 197 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_4 _BLI_STRING_ARGS_3, const char *d |
Definition at line 198 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_5 _BLI_STRING_ARGS_4, const char *e |
Definition at line 199 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_6 _BLI_STRING_ARGS_5, const char *f |
Definition at line 200 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_7 _BLI_STRING_ARGS_6, const char *g |
Definition at line 201 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_8 _BLI_STRING_ARGS_7, const char *h |
Definition at line 202 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_9 _BLI_STRING_ARGS_8, const char *i |
Definition at line 203 of file BLI_string_utils.hh.
| #define BLI_string_join | ( | ... | ) | VA_NARGS_CALL_OVERLOAD(_BLI_string_join_, __VA_ARGS__) |
Definition at line 220 of file BLI_string_utils.hh.
Referenced by BKE_modifier_type_panel_id(), BKE_shaderfxType_panel_id(), bone_constraint_panel_id(), current_relpath_append(), ed_panel_draw(), filelist_readjob_recursive_dir_add_items(), IMB_index_builder_create(), object_constraint_panel_id(), tempdir_session_create(), and version_switch_node_input_prefix().
| #define BLI_string_join_by_sep_char | ( | ... | ) | VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_char_, __VA_ARGS__) |
Definition at line 382 of file BLI_string_utils.hh.
| #define BLI_string_join_by_sep_char_with_tableN | ( | sep, | |
| table, | |||
| ... ) |
Definition at line 122 of file BLI_string_utils.hh.
| #define BLI_string_join_by_sep_charN | ( | ... | ) | VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_charN_, __VA_ARGS__) |
Definition at line 475 of file BLI_string_utils.hh.
Referenced by pyrna_struct_anim_args_parse_no_resolve().
| #define BLI_string_joinN | ( | ... | ) | VA_NARGS_CALL_OVERLOAD(_BLI_string_joinN_, __VA_ARGS__) |
Definition at line 298 of file BLI_string_utils.hh.
Referenced by bli_builddir(), fsmenu_insert_entry(), blender::draw::get_patch_evaluation_shader(), pyrna_struct_anim_args_parse_no_resolve(), and reports_prepend_impl().
| using UniquenameCheckCallback = bool (*)(void *arg, const char *name) |
Definition at line 21 of file BLI_string_utils.hh.
| BLI_INLINE size_t _BLI_string_join_10 | ( | _BLI_STRING_ARGS_8 | ) |
Definition at line 268 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_11 | ( | _BLI_STRING_ARGS_9 | ) |
Definition at line 273 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_12 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 278 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_3 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 233 of file BLI_string_utils.hh.
References ARRAY_SIZE, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_4 | ( | _BLI_STRING_ARGS_2 | ) |
Definition at line 238 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_5 | ( | _BLI_STRING_ARGS_3 | ) |
Definition at line 243 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_6 | ( | _BLI_STRING_ARGS_4 | ) |
Definition at line 248 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_7 | ( | _BLI_STRING_ARGS_5 | ) |
Definition at line 253 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_8 | ( | _BLI_STRING_ARGS_6 | ) |
Definition at line 258 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_9 | ( | _BLI_STRING_ARGS_7 | ) |
Definition at line 263 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_10 | ( | _BLI_STRING_ARGS_7 | ) |
Definition at line 434 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_char(), and e.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_11 | ( | _BLI_STRING_ARGS_8 | ) |
Definition at line 440 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_char(), and e.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_12 | ( | _BLI_STRING_ARGS_9 | ) |
Definition at line 446 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_char(), and e.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_13 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 452 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_char(), and e.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_4 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 398 of file BLI_string_utils.hh.
References ARRAY_SIZE, and BLI_string_join_array_by_sep_char().
| BLI_INLINE size_t _BLI_string_join_by_sep_char_5 | ( | _BLI_STRING_ARGS_2 | ) |
Definition at line 404 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array_by_sep_char().
| BLI_INLINE size_t _BLI_string_join_by_sep_char_6 | ( | _BLI_STRING_ARGS_3 | ) |
Definition at line 410 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array_by_sep_char().
| BLI_INLINE size_t _BLI_string_join_by_sep_char_7 | ( | _BLI_STRING_ARGS_4 | ) |
Definition at line 416 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array_by_sep_char().
| BLI_INLINE size_t _BLI_string_join_by_sep_char_8 | ( | _BLI_STRING_ARGS_5 | ) |
Definition at line 422 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_char(), and e.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_9 | ( | _BLI_STRING_ARGS_6 | ) |
Definition at line 428 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_char(), and e.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_10 | ( | _BLI_STRING_ARGS_9 | ) |
Definition at line 531 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_charN(), and e.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_11 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 536 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_charN(), and e.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_2 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 491 of file BLI_string_utils.hh.
References ARRAY_SIZE, and BLI_string_join_array_by_sep_charN().
| BLI_INLINE char * _BLI_string_join_by_sep_charN_3 | ( | _BLI_STRING_ARGS_2 | ) |
Definition at line 496 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array_by_sep_charN().
| BLI_INLINE char * _BLI_string_join_by_sep_charN_4 | ( | _BLI_STRING_ARGS_3 | ) |
Definition at line 501 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array_by_sep_charN().
| BLI_INLINE char * _BLI_string_join_by_sep_charN_5 | ( | _BLI_STRING_ARGS_4 | ) |
Definition at line 506 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_array_by_sep_charN().
| BLI_INLINE char * _BLI_string_join_by_sep_charN_6 | ( | _BLI_STRING_ARGS_5 | ) |
Definition at line 511 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_charN(), and e.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_7 | ( | _BLI_STRING_ARGS_6 | ) |
Definition at line 516 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_charN(), and e.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_8 | ( | _BLI_STRING_ARGS_7 | ) |
Definition at line 521 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_charN(), and e.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_9 | ( | _BLI_STRING_ARGS_8 | ) |
Definition at line 526 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_array_by_sep_charN(), and e.
| BLI_INLINE char * _BLI_string_joinN_1 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 313 of file BLI_string_utils.hh.
References ARRAY_SIZE, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_10 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 358 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_2 | ( | _BLI_STRING_ARGS_2 | ) |
Definition at line 318 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_3 | ( | _BLI_STRING_ARGS_3 | ) |
Definition at line 323 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_4 | ( | _BLI_STRING_ARGS_4 | ) |
Definition at line 328 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_5 | ( | _BLI_STRING_ARGS_5 | ) |
Definition at line 333 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_6 | ( | _BLI_STRING_ARGS_6 | ) |
Definition at line 338 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_7 | ( | _BLI_STRING_ARGS_7 | ) |
Definition at line 343 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_8 | ( | _BLI_STRING_ARGS_8 | ) |
Definition at line 348 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_9 | ( | _BLI_STRING_ARGS_9 | ) |
Definition at line 353 of file BLI_string_utils.hh.
References ARRAY_SIZE, b, BLI_string_join_arrayN(), and e.
| size_t BLI_string_flip_side_name | ( | char * | name_dst, |
| const char * | name_src, | ||
| bool | strip_number, | ||
| size_t | name_dst_maxncpy ) |
Finds the best possible flipped (left/right) name. For renaming; check for unique names afterwards.
| name_dst | flipped name, assumed to be a pointer to a string of at least name_maxncpy size. |
| name_src | original name, assumed to be a pointer to a string of at least name_maxncpy size. |
| strip_number | If set, remove number extensions. |
Referenced by action_flip_pchan(), action_flip_pchan_rna_paths(), add_verts_to_dgroups(), armature_duplicate_selected_exec(), armature_symmetrize_exec(), BKE_object_defgroup_flip_index(), BKE_object_defgroup_flip_map_single(), BKE_object_defgroup_mirror_selection(), BKE_pose_channel_get_mirrored(), bpy_flip_name(), ED_armature_bones_flip_names(), ED_armature_ebone_get_mirrored(), ED_wpaint_mirror_vgroup_ensure(), flip_names(), object_defgroup_unlocked_flip_map_ex(), blender::ed::object::object_select_mirror_exec(), pose_bone_do_paste(), updateDuplicateCustomBoneShapes(), and updateDuplicateSubtarget().
| size_t bool BLI_string_is_decimal | ( | const char * | string | ) |
Definition at line 198 of file string_utils.cc.
Referenced by ED_text_is_syntax_highlight_supported(), and TEST().
| size_t BLI_string_join_array | ( | char * | result, |
| size_t | result_maxncpy, | ||
| const char * | strings[], | ||
| uint | strings_num ) |
Join strings, return the length of the resulting string.
Definition at line 548 of file string_utils.cc.
References BLI_string_debug_size, result, and UNLIKELY.
Referenced by _BLI_string_join_10(), _BLI_string_join_11(), _BLI_string_join_12(), _BLI_string_join_3(), _BLI_string_join_4(), _BLI_string_join_5(), _BLI_string_join_6(), _BLI_string_join_7(), _BLI_string_join_8(), _BLI_string_join_9(), draw_selected_name(), draw_seq_in_view(), draw_seq_text_get_overlay_string(), draw_viewport_name(), make_renderinfo_string(), and string_join_array_test_truncate().
| size_t BLI_string_join_array_by_sep_char | ( | char * | result, |
| size_t | result_maxncpy, | ||
| char | sep, | ||
| const char * | strings[], | ||
| uint | strings_num ) |
A version of BLI_string_join_array that takes a separator which can be any character including '\0'.
Definition at line 571 of file string_utils.cc.
References BLI_string_debug_size, result, and UNLIKELY.
Referenced by _BLI_string_join_by_sep_char_10(), _BLI_string_join_by_sep_char_11(), _BLI_string_join_by_sep_char_12(), _BLI_string_join_by_sep_char_13(), _BLI_string_join_by_sep_char_4(), _BLI_string_join_by_sep_char_5(), _BLI_string_join_by_sep_char_6(), _BLI_string_join_by_sep_char_7(), _BLI_string_join_by_sep_char_8(), _BLI_string_join_by_sep_char_9(), BPy_BMElem_StringFromHType_ex(), RE_render_result_full_channel_name(), and string_join_array_with_sep_char_test_truncate().
| void void char * BLI_string_join_array_by_sep_char_with_tableN | ( | char | sep, |
| char * | table[], | ||
| const char * | strings[], | ||
| uint | strings_num ) |
A version of BLI_string_join_array_by_sep_charN that takes a table array. The new location of each string is written into this array.
| char * BLI_string_join_array_by_sep_charN | ( | char | sep, |
| const char * | strings[], | ||
| uint | strings_num ) |
A version of BLI_string_join_by_sep_char that takes a separator which can be any character including '\0'.
Definition at line 614 of file string_utils.cc.
References BLI_assert, BLI_string_len_array(), and result.
Referenced by _BLI_string_join_by_sep_charN_10(), _BLI_string_join_by_sep_charN_11(), _BLI_string_join_by_sep_charN_2(), _BLI_string_join_by_sep_charN_3(), _BLI_string_join_by_sep_charN_4(), _BLI_string_join_by_sep_charN_5(), _BLI_string_join_by_sep_charN_6(), _BLI_string_join_by_sep_charN_7(), _BLI_string_join_by_sep_charN_8(), _BLI_string_join_by_sep_charN_9(), and string_join_array_with_sep_char_test_truncate().
| char * BLI_string_join_arrayN | ( | const char * | strings[], |
| uint | strings_num ) |
Join an array of strings into a newly allocated, null terminated string.
Definition at line 598 of file string_utils.cc.
References BLI_assert, BLI_string_len_array(), and result.
Referenced by _BLI_string_joinN_1(), _BLI_string_joinN_10(), _BLI_string_joinN_2(), _BLI_string_joinN_3(), _BLI_string_joinN_4(), _BLI_string_joinN_5(), _BLI_string_joinN_6(), _BLI_string_joinN_7(), _BLI_string_joinN_8(), _BLI_string_joinN_9(), blender::gpu::combine_sources(), blender::gpu::Shader::print_log(), and string_join_array_test_truncate().
| void size_t BLI_string_len_array | ( | const char * | strings[], |
| uint | strings_num ) |
Definition at line 528 of file string_utils.cc.
Referenced by BLI_string_join_array_by_sep_charN(), BLI_string_join_arrayN(), draw_selected_name(), and make_renderinfo_string().
| void BLI_string_replace_char | ( | char * | str, |
| char | src, | ||
| char | dst ) |
In-place replace every src to dst in str.
| str | The string to operate on. |
| src | The character to replace. |
| dst | The character to replace with. |
Definition at line 88 of file string_utils.cc.
References str.
Referenced by BLI_path_abs(), BLI_path_rel(), BLI_path_slash_native(), BLI_path_to_display_name(), blender::gpu::create_gpu_name(), blender::gpu::create_key(), blender::io::stl::export_frame(), blender::io::usd::export_packed_texture(), blender::bke::bake::file_name_to_frame(), blender::bke::bake::frame_to_file_name(), blender::io::usd::get_relative_path(), blender::io::usd::get_tex_image_asset_filepath(), memiter_words10k_test(), str_replace_char_strdup(), str_replace_char_with_relative_exception(), uri_from_filename(), view_layer_add_lightgroup_exec(), viewlayer_aov_make_name_unique(), and viewlayer_lightgroup_make_name_unique().
| size_t BLI_string_replace_range | ( | char * | string, |
| size_t | string_maxncpy, | ||
| int | src_beg, | ||
| int | src_end, | ||
| const char * | dst ) |
Write dst into the range between src_beg & src_end, resize within string_maxncpy limits, ensure null terminated.
string. Definition at line 114 of file string_utils.cc.
References BLI_assert, int, and UNLIKELY.
Referenced by BLI_path_frame(), and BLI_path_frame_range().
| bool BLI_string_replace_table_exact | ( | char * | string, |
| size_t | string_len, | ||
| const char * | replace_table[][2], | ||
| int | replace_table_len ) |
Simple exact-match string replacement.
| replace_table | Array of source, destination pairs. |
Definition at line 98 of file string_utils.cc.
References BLI_string_debug_size_after_nil, BLI_strncpy(), and STREQ.
Referenced by BKE_workspace_tool_id_replace_table(), and blo_do_versions_userdef().
| char * BLI_string_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.
| str | The string to replace occurrences of substr_old in |
| substr_old | The text in the string to find and replace |
| substr_new | The text in the string to find and replace |
| Returns | the duplicated string |
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().
| size_t BLI_string_split_name_number | ( | const char * | name, |
| char | delim, | ||
| char * | r_name_left, | ||
| int * | r_number ) |
Looks for a numeric suffix preceded by delim character on the end of name, puts preceding part into *left and value of suffix into *nr. Returns the length of *left.
Foo.001 -> "Foo", 1 Returning the length of "Foo"
| left | Where to return copy of part preceding delim. |
| nr | Where to return value of numeric suffix. \param name: String to split. |
| delim | Delimiter character`. |
Referenced by BKE_id_new_name_validate(), BKE_main_namemap_get_name(), BKE_mball_basis_find(), BKE_mball_is_same_group(), BKE_mball_properties_copy(), init_meta(), main_namemap_populate(), and namemap_remove_name().
| void void BLI_string_split_prefix | ( | const char * | string, |
| size_t | string_maxlen, | ||
| char * | r_pre, | ||
| char * | r_body ) |
"a.b.c" -> ("a.", "b.c").
Referenced by select_similar_prefix().
| void BLI_string_split_suffix | ( | const char * | string, |
| size_t | string_maxlen, | ||
| char * | r_body, | ||
| char * | r_suf ) |
Based on BLI_path_split_dir_file() / os.path.splitext(), "a.b.c" -> ("a.b", ".c").
Referenced by blender::io::usd::get_in_memory_texture_filename(), and select_similar_suffix().
| void BLI_uniquename | ( | const struct ListBase * | list, |
| void * | vlink, | ||
| const char * | defname, | ||
| char | delim, | ||
| int | name_offset, | ||
| size_t | name_maxncpy ) |
Ensures that the specified block has a unique name within the containing list, incrementing its numeric suffix as necessary.
| list | List containing the block |
| vlink | The block to check the name for |
| defname | To initialize block name if latter is empty |
| delim | Delimits numeric suffix in name |
| name_offset | Offset of name within block structure |
| name_maxncpy | Maximum length of name area |
Referenced by action_groups_add_new(), AnimationImporter::add_bone_fcurve(), add_to_modifier_list(), BKE_asset_metadata_tag_add(), BKE_collection_exporter_name_set(), BKE_constraint_unique_name(), BKE_fmodifier_name_set(), BKE_freestyle_lineset_unique_name(), BKE_gpencil_layer_addnew(), BKE_gpencil_palette_addnew(), BKE_gpencil_palettecolor_addnew(), BKE_keyblock_add(), BKE_keyingset_add(), BKE_mask_layer_unique_name(), BKE_modifier_unique_name(), BKE_nla_action_stash(), BKE_nlatrack_insert_after(), BKE_nlatrack_insert_before(), BKE_pose_add_group(), BKE_preferences_asset_library_name_set(), BKE_preferences_extension_repo_module_set(), BKE_preferences_extension_repo_name_set(), BKE_scene_add_render_view(), BKE_shaderfx_unique_name(), BKE_tracking_object_unique_name(), BKE_tracking_plane_track_unique_name(), BKE_tracking_track_unique_name(), BKE_view_layer_add(), BKE_view_layer_rename(), do_versions_after_linking_300(), do_versions_nodetree_customnodes(), do_versions_theme(), driver_add_new_variable(), driver_variable_unique_name(), fcurve_add_to_list(), blender::ed::outliner::namebutton_fn(), blender::bke::node_unique_name(), psys_unique_name(), SEQ_modifier_list_copy(), SEQ_modifier_unique_name(), tracks_map_merge(), viewlayer_aov_make_name_unique(), viewlayer_lightgroup_make_name_unique(), and workspace_layout_name_set().
| size_t void std::string BLI_uniquename_cb | ( | blender::FunctionRef< bool(blender::StringRef)> | unique_check, |
| char | delim, | ||
| blender::StringRef | name ) |
Ensures name is unique (according to criteria specified by caller in unique_check callback), incrementing its numeric suffix as necessary.
| unique_check | Return true if name is not unique |
| delim | Delimits numeric suffix in name |
| name | Name to be ensured unique |
Definition at line 430 of file string_utils.cc.
References BLI_snprintf(), BLI_string_split_name_number(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), and len.
| size_t void BLI_uniquename_cb | ( | UniquenameCheckCallback | unique_check, |
| void * | arg, | ||
| const char * | defname, | ||
| char | delim, | ||
| char * | name, | ||
| size_t | name_maxncpy ) |
Ensures name is unique (according to criteria specified by caller in unique_check callback), incrementing its numeric suffix as necessary.
| unique_check | Return true if name is not unique |
| arg | Additional arg to unique_check–meaning is up to caller |
| defname | To initialize name if latter is empty |
| delim | Delimits numeric suffix in name |
| name | Name to be ensured unique |
| name_maxncpy | Maximum length of name area |
Referenced by BKE_attribute_calc_unique_name(), BKE_nlastrip_validate_name(), BKE_object_defgroup_unique_name(), bonecoll_ensure_name_unique(), blender::ed::asset::catalog_name_ensure_unique(), blender::animrig::ChannelBag::channel_group_create(), CustomData_set_layer_unique_name(), blender::ed::object::dash_modifier_segment_add_exec(), dynamicPaintSurface_setUniqueName(), ed_armature_bone_unique_name(), ED_armature_ebone_unique_name(), blender::bke::make_socket(), ntreeCompositOutputFileUniqueLayer(), ntreeCompositOutputFileUniquePath(), blender::nodes::socket_items::set_item_name_and_make_unique(), blender::animrig::slot_name_ensure_unique(), surface_setUniqueOutputName(), blender::TEST(), blender::ed::object::time_modifier_segment_add_exec(), unique_node_name_ex(), blender::bke::unique_socket_template_identifier(), and uniqueOrientationName().
| char ATTR_MALLOC |
Definition at line 43 of file BLI_string_utils.hh.