Blender V5.3
BLI_string_utils.hh File Reference
#include <cstdarg>
#include <string>
#include "BLI_compiler_attrs.hh"
#include "BLI_function_ref.hh"
#include "BLI_string_ref.hh"
#include "BLI_utildefines.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

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

size_t blender::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 blender::BLI_uniquename_cb (FunctionRef< bool(StringRefNull)> unique_check, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(2
size_t void std::string blender::BLI_uniquename_cb (FunctionRef< bool(StringRef)> unique_check, char delim, StringRef name)
void blender::BLI_uniquename (const ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
void size_t blender::BLI_string_len_array (const char *strings[], uint strings_num) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
String Replace
char * blender::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 blender::BLI_string_replace (std::string &haystack, StringRef needle, StringRef other)
std::string blender::BLI_string_pad_number_sign (blender::StringRef str)
void blender::BLI_string_replace_char (char *str, char src, char dst) ATTR_NONNULL(1)
bool blender::BLI_string_replace_table_exact (char *string, size_t string_maxncpy, const char *replace_table[][2], int replace_table_len)
size_t blender::BLI_string_replace_range (char *string, size_t string_maxncpy, int src_beg, int src_end, const char *dst)
String Split
size_t blender::BLI_string_split_name_number (const char *name, char delim, char *r_name_left, int *r_number) ATTR_NONNULL(1
size_t StringRef blender::BLI_string_split_name_number (const StringRef name_full, char delim, int &r_number)
bool blender::BLI_string_is_decimal (const char *string) ATTR_NONNULL(1)
void blender::BLI_string_split_suffix (const char *string, size_t string_maxlen, char *r_body, char *r_suf) ATTR_NONNULL(1
void void blender::BLI_string_split_prefix (const char *string, size_t string_maxlen, char *r_pre, char *r_body) ATTR_NONNULL(1
Join Strings
void void char * blender::BLI_string_join_array_by_sep_char_with_tableN (char sep, char *table[], const char *strings[], uint strings_num) ATTR_NONNULL(2

Implement: <tt>BLI_string_join_by_sep_charN(..)</tt>

#define _BLI_STRING_ARGS_0   char *__restrict dst, const size_t dst_len,
#define _BLI_STRING_ARGS_0
#define _BLI_STRING_ARGS_0   char *__restrict dst, const size_t dst_len, const char sep,
#define BLI_string_join_by_sep_charN(...)
#define _BLI_STRING_ARGS_0   const char sep,
char * blender::BLI_string_join_array_by_sep_charN (char sep, const char *strings[], uint strings_num) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_2 (_BLI_STRING_ARGS_1) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_3 (_BLI_STRING_ARGS_2) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_4 (_BLI_STRING_ARGS_3) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_5 (_BLI_STRING_ARGS_4) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_6 (_BLI_STRING_ARGS_5) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_7 (_BLI_STRING_ARGS_6) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_8 (_BLI_STRING_ARGS_7) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_9 (_BLI_STRING_ARGS_8) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_10 (_BLI_STRING_ARGS_9) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_join_by_sep_charN_11 (_BLI_STRING_ARGS_10) ATTR_NONNULL()

Implement: <tt>BLI_string_join(..)</tt>

#define BLI_string_join(...)
size_t blender::BLI_string_join_array (char *result, size_t result_maxncpy, const char *strings[], uint strings_num) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_3 (_BLI_STRING_ARGS_1) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_4 (_BLI_STRING_ARGS_2) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_5 (_BLI_STRING_ARGS_3) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_6 (_BLI_STRING_ARGS_4) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_7 (_BLI_STRING_ARGS_5) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_8 (_BLI_STRING_ARGS_6) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_9 (_BLI_STRING_ARGS_7) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_10 (_BLI_STRING_ARGS_8) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_11 (_BLI_STRING_ARGS_9) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_12 (_BLI_STRING_ARGS_10) ATTR_NONNULL()

Implement: <tt>BLI_string_joinN(..)</tt>

#define BLI_string_joinN(...)
char * blender::BLI_string_join_arrayN (const char *strings[], uint strings_num) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_1 (_BLI_STRING_ARGS_1) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_2 (_BLI_STRING_ARGS_2) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_3 (_BLI_STRING_ARGS_3) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_4 (_BLI_STRING_ARGS_4) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_5 (_BLI_STRING_ARGS_5) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_6 (_BLI_STRING_ARGS_6) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_7 (_BLI_STRING_ARGS_7) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_8 (_BLI_STRING_ARGS_8) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_9 (_BLI_STRING_ARGS_9) ATTR_NONNULL()
BLI_INLINE char * blender::_BLI_string_joinN_10 (_BLI_STRING_ARGS_10) ATTR_NONNULL()

Implement: <tt>BLI_string_join_by_sep_char(..)</tt>

#define BLI_string_join_by_sep_char(...)
size_t blender::BLI_string_join_array_by_sep_char (char *result, size_t result_maxncpy, char sep, const char *strings[], uint strings_num) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_4 (_BLI_STRING_ARGS_1) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_5 (_BLI_STRING_ARGS_2) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_6 (_BLI_STRING_ARGS_3) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_7 (_BLI_STRING_ARGS_4) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_8 (_BLI_STRING_ARGS_5) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_9 (_BLI_STRING_ARGS_6) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_10 (_BLI_STRING_ARGS_7) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_11 (_BLI_STRING_ARGS_8) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_12 (_BLI_STRING_ARGS_9) ATTR_NONNULL()
BLI_INLINE size_t blender::_BLI_string_join_by_sep_char_13 (_BLI_STRING_ARGS_10) ATTR_NONNULL()

Macro Definition Documentation

◆ _BLI_STRING_ARGS_0 [1/4]

#define _BLI_STRING_ARGS_0   const char sep,

Definition at line 229 of file BLI_string_utils.hh.

◆ _BLI_STRING_ARGS_0 [2/4]

#define _BLI_STRING_ARGS_0   char *__restrict dst, const size_t dst_len, const char sep,

Definition at line 229 of file BLI_string_utils.hh.

◆ _BLI_STRING_ARGS_0 [3/4]

#define _BLI_STRING_ARGS_0

Definition at line 229 of file BLI_string_utils.hh.

◆ _BLI_STRING_ARGS_0 [4/4]

#define _BLI_STRING_ARGS_0   char *__restrict dst, const size_t dst_len,

Definition at line 229 of file BLI_string_utils.hh.

◆ _BLI_STRING_ARGS_1

◆ _BLI_STRING_ARGS_10

◆ _BLI_STRING_ARGS_2

◆ _BLI_STRING_ARGS_3

◆ _BLI_STRING_ARGS_4

◆ _BLI_STRING_ARGS_5

◆ _BLI_STRING_ARGS_6

◆ _BLI_STRING_ARGS_7

◆ _BLI_STRING_ARGS_8

◆ _BLI_STRING_ARGS_9

◆ BLI_string_join

◆ BLI_string_join_by_sep_char

#define BLI_string_join_by_sep_char ( ...)
Value:
VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_char_, __VA_ARGS__)

Definition at line 401 of file BLI_string_utils.hh.

Referenced by blender::bpy_text_filepath_get().

◆ BLI_string_join_by_sep_char_with_tableN

#define BLI_string_join_by_sep_char_with_tableN ( sep,
table,
... )
Value:
BLI_string_join_array_by_sep_char_with_tableN( \
sep, table, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
#define VA_NARGS_COUNT(...)

Definition at line 138 of file BLI_string_utils.hh.

◆ BLI_string_join_by_sep_charN

#define BLI_string_join_by_sep_charN ( ...)
Value:
VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_charN_, __VA_ARGS__)

Definition at line 494 of file BLI_string_utils.hh.

Referenced by blender::pyrna_struct_anim_args_parse_no_resolve().

◆ BLI_string_joinN