|
Blender V5.0
|
#include <cstdarg>#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 |
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 (blender::FunctionRef< bool(blender::StringRefNull)> unique_check, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(2 |
| 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 blender::StringRef | BLI_string_split_name_number (const blender::StringRef name_full, char delim, int &r_number) |
| 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(...) |
| 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(...) |
| 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 (std::string &haystack, blender::StringRef needle, blender::StringRef other) |
| 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_maxncpy, 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 const char sep, |
Definition at line 221 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 221 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_0 |
Definition at line 221 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_0 char *__restrict dst, const size_t dst_len, |
Definition at line 221 of file BLI_string_utils.hh.
| #define _BLI_STRING_ARGS_1 _BLI_STRING_ARGS_0 const char *a |
Definition at line 206 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_3(), _BLI_string_join_by_sep_char_4(), _BLI_string_join_by_sep_charN_2(), and _BLI_string_joinN_1().
| #define _BLI_STRING_ARGS_10 _BLI_STRING_ARGS_9, const char *j |
Definition at line 215 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_12(), _BLI_string_join_by_sep_char_13(), _BLI_string_join_by_sep_charN_11(), and _BLI_string_joinN_10().
| #define _BLI_STRING_ARGS_2 _BLI_STRING_ARGS_1, const char *b |
Definition at line 207 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_4(), _BLI_string_join_by_sep_char_5(), _BLI_string_join_by_sep_charN_3(), and _BLI_string_joinN_2().
| #define _BLI_STRING_ARGS_3 _BLI_STRING_ARGS_2, const char *c |
Definition at line 208 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_5(), _BLI_string_join_by_sep_char_6(), _BLI_string_join_by_sep_charN_4(), and _BLI_string_joinN_3().
| #define _BLI_STRING_ARGS_4 _BLI_STRING_ARGS_3, const char *d |
Definition at line 209 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_6(), _BLI_string_join_by_sep_char_7(), _BLI_string_join_by_sep_charN_5(), and _BLI_string_joinN_4().
| #define _BLI_STRING_ARGS_5 _BLI_STRING_ARGS_4, const char *e |
Definition at line 210 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_7(), _BLI_string_join_by_sep_char_8(), _BLI_string_join_by_sep_charN_6(), and _BLI_string_joinN_5().
| #define _BLI_STRING_ARGS_6 _BLI_STRING_ARGS_5, const char *f |
Definition at line 211 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_8(), _BLI_string_join_by_sep_char_9(), _BLI_string_join_by_sep_charN_7(), and _BLI_string_joinN_6().
| #define _BLI_STRING_ARGS_7 _BLI_STRING_ARGS_6, const char *g |
Definition at line 212 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_9(), _BLI_string_join_by_sep_char_10(), _BLI_string_join_by_sep_charN_8(), and _BLI_string_joinN_7().
| #define _BLI_STRING_ARGS_8 _BLI_STRING_ARGS_7, const char *h |
Definition at line 213 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_10(), _BLI_string_join_by_sep_char_11(), _BLI_string_join_by_sep_charN_9(), and _BLI_string_joinN_8().
| #define _BLI_STRING_ARGS_9 _BLI_STRING_ARGS_8, const char *i |
Definition at line 214 of file BLI_string_utils.hh.
Referenced by _BLI_string_join_11(), _BLI_string_join_by_sep_char_12(), _BLI_string_join_by_sep_charN_10(), and _BLI_string_joinN_9().
| #define BLI_string_join | ( | ... | ) |
Definition at line 231 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(), blender::seq::modifier_type_panel_id(), object_constraint_panel_id(), print_error(), tempdir_session_create(), and version_switch_node_input_prefix().
| #define BLI_string_join_by_sep_char | ( | ... | ) |
Definition at line 393 of file BLI_string_utils.hh.
Referenced by bpy_text_filepath_get().
| #define BLI_string_join_by_sep_char_with_tableN | ( | sep, | |
| table, | |||
| ... ) |
Definition at line 130 of file BLI_string_utils.hh.
| #define BLI_string_join_by_sep_charN | ( | ... | ) |
Definition at line 486 of file BLI_string_utils.hh.
Referenced by pyrna_struct_anim_args_parse_no_resolve().
| #define BLI_string_joinN | ( | ... | ) |
Definition at line 309 of file BLI_string_utils.hh.
Referenced by bli_builddir(), fsmenu_insert_entry(), pyrna_struct_anim_args_parse_no_resolve(), reports_prepend_impl(), and version_bone_hide_property_driver().
| BLI_INLINE size_t _BLI_string_join_10 | ( | _BLI_STRING_ARGS_8 | ) |
Definition at line 279 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_8, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_11 | ( | _BLI_STRING_ARGS_9 | ) |
Definition at line 284 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_9, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array(), e, and i.
| BLI_INLINE size_t _BLI_string_join_12 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 289 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_10, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array(), e, and i.
| BLI_INLINE size_t _BLI_string_join_3 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 244 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_1, ARRAY_SIZE, BLI_INLINE, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_4 | ( | _BLI_STRING_ARGS_2 | ) |
Definition at line 249 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_2, ARRAY_SIZE, b, BLI_INLINE, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_5 | ( | _BLI_STRING_ARGS_3 | ) |
Definition at line 254 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_3, ARRAY_SIZE, b, BLI_INLINE, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_6 | ( | _BLI_STRING_ARGS_4 | ) |
Definition at line 259 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_4, ARRAY_SIZE, b, BLI_INLINE, and BLI_string_join_array().
| BLI_INLINE size_t _BLI_string_join_7 | ( | _BLI_STRING_ARGS_5 | ) |
Definition at line 264 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_5, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_8 | ( | _BLI_STRING_ARGS_6 | ) |
Definition at line 269 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_6, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_9 | ( | _BLI_STRING_ARGS_7 | ) |
Definition at line 274 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_7, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array(), and e.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_10 | ( | _BLI_STRING_ARGS_7 | ) |
Definition at line 445 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_7, ARRAY_SIZE, b, BLI_INLINE, 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 451 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_8, ARRAY_SIZE, b, BLI_INLINE, 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 457 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_9, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array_by_sep_char(), e, and i.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_13 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 463 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_10, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array_by_sep_char(), e, and i.
| BLI_INLINE size_t _BLI_string_join_by_sep_char_4 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 409 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_1, ARRAY_SIZE, BLI_INLINE, 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 415 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_2, ARRAY_SIZE, b, BLI_INLINE, 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 421 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_3, ARRAY_SIZE, b, BLI_INLINE, 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 427 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_4, ARRAY_SIZE, b, BLI_INLINE, 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 433 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_5, ARRAY_SIZE, b, BLI_INLINE, 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 439 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_6, ARRAY_SIZE, b, BLI_INLINE, 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 542 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_9, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array_by_sep_charN(), e, and i.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_11 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 547 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_10, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array_by_sep_charN(), e, and i.
| BLI_INLINE char * _BLI_string_join_by_sep_charN_2 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 502 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_1, ARRAY_SIZE, BLI_INLINE, 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 507 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_2, ARRAY_SIZE, b, BLI_INLINE, 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 512 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_3, ARRAY_SIZE, b, BLI_INLINE, 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 517 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_4, ARRAY_SIZE, b, BLI_INLINE, 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 522 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_5, ARRAY_SIZE, b, BLI_INLINE, 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 527 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_6, ARRAY_SIZE, b, BLI_INLINE, 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 532 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_7, ARRAY_SIZE, b, BLI_INLINE, 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 537 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_8, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_array_by_sep_charN(), and e.
| BLI_INLINE char * _BLI_string_joinN_1 | ( | _BLI_STRING_ARGS_1 | ) |
Definition at line 324 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_1, ARRAY_SIZE, BLI_INLINE, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_10 | ( | _BLI_STRING_ARGS_10 | ) |
Definition at line 369 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_10, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_arrayN(), e, and i.
| BLI_INLINE char * _BLI_string_joinN_2 | ( | _BLI_STRING_ARGS_2 | ) |
Definition at line 329 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_2, ARRAY_SIZE, b, BLI_INLINE, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_3 | ( | _BLI_STRING_ARGS_3 | ) |
Definition at line 334 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_3, ARRAY_SIZE, b, BLI_INLINE, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_4 | ( | _BLI_STRING_ARGS_4 | ) |
Definition at line 339 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_4, ARRAY_SIZE, b, BLI_INLINE, and BLI_string_join_arrayN().
| BLI_INLINE char * _BLI_string_joinN_5 | ( | _BLI_STRING_ARGS_5 | ) |
Definition at line 344 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_5, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_6 | ( | _BLI_STRING_ARGS_6 | ) |
Definition at line 349 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_6, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_7 | ( | _BLI_STRING_ARGS_7 | ) |
Definition at line 354 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_7, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_8 | ( | _BLI_STRING_ARGS_8 | ) |
Definition at line 359 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_8, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_arrayN(), and e.
| BLI_INLINE char * _BLI_string_joinN_9 | ( | _BLI_STRING_ARGS_9 | ) |
Definition at line 364 of file BLI_string_utils.hh.
References _BLI_STRING_ARGS_9, ARRAY_SIZE, b, BLI_INLINE, BLI_string_join_arrayN(), e, and i.
| 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(), blender::ed::animation::flip_names(), mirror_bone_collection_assignments(), object_defgroup_unlocked_flip_map_ex(), blender::ed::object::object_select_mirror_exec(), pose_bone_do_paste(), update_duplicate_custom_bone_shapes(), and update_duplicate_subtarget().
| bool BLI_string_is_decimal | ( | const char * | string | ) |
Definition at line 220 of file blenlib/intern/string_utils.cc.
Referenced by BLI_string_split_name_number(), 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 535 of file blenlib/intern/string_utils.cc.
References BLI_string_debug_size, i, 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(), blender::ed::vse::draw_seq_text_get_overlay_string(), blender::ed::vse::draw_strip_in_view(), 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 558 of file blenlib/intern/string_utils.cc.
References BLI_string_debug_size, i, 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.
References ATTR_NONNULL, and BLI_string_join_array_by_sep_char_with_tableN().
Referenced by BLI_string_join_array_by_sep_char_with_tableN().
| 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 601 of file blenlib/intern/string_utils.cc.
References BLI_assert, BLI_string_len_array(), i, MEM_calloc_arrayN(), 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 585 of file blenlib/intern/string_utils.cc.
References BLI_assert, BLI_string_len_array(), i, MEM_calloc_arrayN(), 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(), and string_join_array_test_truncate().
| void size_t BLI_string_len_array | ( | const char * | strings[], |
| uint | strings_num ) |
Definition at line 515 of file blenlib/intern/string_utils.cc.
References i.
Referenced by BLI_string_join_array_by_sep_charN(), BLI_string_join_arrayN(), draw_selected_name(), and make_renderinfo_string().
| void BLI_string_replace | ( | std::string & | haystack, |
| blender::StringRef | needle, | ||
| blender::StringRef | other ) |
In-place replacement all occurrences of needle in haystack with other.
Definition at line 91 of file blenlib/intern/string_utils.cc.
References i, and blender::StringRefBase::size().
Referenced by blender::TEST().
| 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 103 of file blenlib/intern/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_filepath(), view_layer_add_lightgroup_exec(), viewlayer_aov_make_name_unique(), viewlayer_lightgroup_make_name_unique(), and blender::io::usd::world_material_to_dome_light().
| 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.
Definition at line 129 of file blenlib/intern/string_utils.cc.
References BLI_assert, and UNLIKELY.
Referenced by BLI_path_frame(), BLI_path_frame_range(), eval_template(), and version_escape_curly_braces().
| bool BLI_string_replace_table_exact | ( | char * | string, |
| size_t | string_maxncpy, | ||
| const char * | replace_table[][2], | ||
| int | replace_table_len ) |
Simple exact-match string replacement.
| replace_table | Array of source, destination pairs. |
Definition at line 113 of file blenlib/intern/string_utils.cc.
References BLI_string_debug_size_after_nil, BLI_strncpy(), i, 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 |
References ATTR_WARN_UNUSED_RESULT, 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 update_duplicate_action_constraint_settings().
| size_t blender::StringRef BLI_string_split_name_number | ( | const blender::StringRef | name_full, |
| char | delim, | ||
| int & | r_number ) |
Definition at line 180 of file blenlib/intern/string_utils.cc.
References blender::StringRefBase::begin(), blender::StringRefBase::end(), blender::StringRefBase::not_found, blender::StringRefBase::rfind(), blender::StringRefBase::size(), and blender::StringRefBase::substr().
Referenced by BLI_string_split_name_number(), BLI_uniquename_cb(), and BLI_uniquename_cb().
| 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. |
| name | String to split. |
| delim | Delimiter character. |
References ATTR_NONNULL, BLI_string_is_decimal(), BLI_string_split_name_number(), and name.
Referenced by BKE_id_new_name_validate(), BKE_mball_basis_find(), BKE_mball_is_same_group(), BKE_mball_properties_copy(), BLI_string_split_name_number(), init_meta(), namemap_get_name(), UniqueName_Map::populate(), UniqueName_Map::remove_full_name(), and blender::ed::vse::sequencer_change_effect_type_exec().
| 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").
References ATTR_NONNULL, and BLI_string_split_prefix().
Referenced by BLI_string_split_prefix(), and 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").
References ATTR_NONNULL, and BLI_string_split_suffix().
Referenced by BLI_string_split_suffix(), 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 |
References ATTR_WARN_UNUSED_RESULT.
Referenced by action_groups_add_new(), 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(), blender::seq::modifier_copy(), blender::seq::modifier_unique_name(), blender::ed::outliner::namebutton_fn(), blender::bke::node_unique_name(), psys_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 ) |
Return a name that 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 made unique |
Definition at line 451 of file blenlib/intern/string_utils.cc.
References BLI_snprintf(), BLI_string_split_name_number(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), left, len, and name.
| size_t void BLI_uniquename_cb | ( | blender::FunctionRef< bool(blender::StringRefNull)> | unique_check, |
| 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 |
| 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 |
References name.
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(), long_id_names_process_action_slots_identifiers(), blender::bke::make_socket(), blender::io::AbstractHierarchyIterator::make_unique_name(), ntreeCompositOutputFileUniqueLayer(), ntreeCompositOutputFileUniquePath(), rename_mesh_uv_seam_attribute(), blender::nodes::socket_items::set_item_name_and_make_unique(), blender::animrig::slot_identifier_ensure_unique(), surface_setUniqueOutputName(), blender::TEST(), blender::ed::object::time_modifier_segment_add_exec(), blender::nodes::materialx::NodeGraph::unique_anonymous_node_name(), blender::bke::AttributeStorage::unique_name_calc(), blender::nodes::materialx::NodeGraph::unique_node_name(), unique_node_name(), blender::bke::unique_socket_template_identifier(), and blender::ed::transform::uniqueOrientationName().
| char ATTR_MALLOC |
Definition at line 41 of file BLI_string_utils.hh.