Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BLI_string_utils.h « blenlib « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 936e892a9e24d1de9f435274bc6b48c6cfd3e89e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2017 Blender Foundation. All rights reserved. */

#pragma once

/** \file
 * \ingroup bli
 */

#include <stdarg.h>

#include "BLI_compiler_attrs.h"
#include "BLI_utildefines.h"

#ifdef __cplusplus
extern "C" {
#endif

struct ListBase;

typedef bool (*UniquenameCheckCallback)(void *arg, const char *name);

/**
 * 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"
 *
 * \param left: Where to return copy of part preceding `delim`.
 * \param nr: Where to return value of numeric suffix`.
 * \param name: String to split`.
 * \param delim: Delimiter character`.
 * \return Length of \a left.
 */
size_t BLI_split_name_num(char *left, int *nr, const char *name, char delim);
bool BLI_string_is_decimal(const char *string) ATTR_NONNULL();

/**
 * Based on `BLI_split_dirfile()` / `os.path.splitext()`,
 * `"a.b.c"` -> (`"a.b"`, `".c"`).
 */
void BLI_string_split_suffix(const char *string, char *r_body, char *r_suf, size_t str_len);
/**
 * `"a.b.c"` -> (`"a."`, `"b.c"`).
 */
void BLI_string_split_prefix(const char *string, char *r_pre, char *r_body, size_t str_len);

/**
 * 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_char_with_tableN(char sep,
                                                    char *table[],
                                                    const char *strings[],
                                                    uint strings_len) ATTR_NONNULL();

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

/**
 * Finds the best possible flipped (left/right) name.
 * For renaming; check for unique names afterwards.
 *
 * \param r_name: flipped name,
 * assumed to be a pointer to a string of at least \a name_len size.
 * \param from_name: original name,
 * assumed to be a pointer to a string of at least \a name_len size.
 * \param strip_number: If set, remove number extensions.
 * \return The number of bytes written into \a r_name.
 */
size_t BLI_string_flip_side_name(char *r_name,
                                 const char *from_name,
                                 bool strip_number,
                                 size_t name_len);

/**
 * Ensures name is unique (according to criteria specified by caller in unique_check callback),
 * incrementing its numeric suffix as necessary. Returns true if name had to be adjusted.
 *
 * \param unique_check: Return true if name is not unique
 * \param arg: Additional arg to unique_check--meaning is up to caller
 * \param defname: To initialize name if latter is empty
 * \param delim: Delimits numeric suffix in name
 * \param name: Name to be ensured unique
 * \param name_len: Maximum length of name area
 * \return true if there if the name was changed
 */
bool BLI_uniquename_cb(UniquenameCheckCallback unique_check,
                       void *arg,
                       const char *defname,
                       char delim,
                       char *name,
                       size_t name_len);
/**
 * Ensures that the specified block has a unique name within the containing list,
 * incrementing its numeric suffix as necessary. Returns true if name had to be adjusted.
 *
 * \param list: List containing the block
 * \param vlink: The block to check the name for
 * \param defname: To initialize block name if latter is empty
 * \param delim: Delimits numeric suffix in name
 * \param name_offset: Offset of name within block structure
 * \param name_len: Maximum length of name area
 */
bool BLI_uniquename(struct ListBase *list,
                    void *vlink,
                    const char *defname,
                    char delim,
                    int name_offset,
                    size_t name_len);

/* Expand array functions. */

/* Intentionally no comma after `_BLI_STRING_ARGS_0` to allow it to be empty. */
#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

/* ------------------------------------------------------------------------- */
/** \name Implement: `BLI_string_join(..)`
 * \{ */

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

/**
 * Join strings, return the length of the resulting string.
 */
size_t BLI_string_join_array(char *result,
                             size_t result_len,
                             const char *strings[],
                             uint strings_len) ATTR_NONNULL();

#define BLI_string_join(...) VA_NARGS_CALL_OVERLOAD(_BLI_string_join_, __VA_ARGS__)

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();

BLI_INLINE size_t _BLI_string_join_3(_BLI_STRING_ARGS_1)
{
  const char *string_array[] = {a};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_4(_BLI_STRING_ARGS_2)
{
  const char *string_array[] = {a, b};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_5(_BLI_STRING_ARGS_3)
{
  const char *string_array[] = {a, b, c};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_6(_BLI_STRING_ARGS_4)
{
  const char *string_array[] = {a, b, c, d};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_7(_BLI_STRING_ARGS_5)
{
  const char *string_array[] = {a, b, c, d, e};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_8(_BLI_STRING_ARGS_6)
{
  const char *string_array[] = {a, b, c, d, e, f};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_9(_BLI_STRING_ARGS_7)
{
  const char *string_array[] = {a, b, c, d, e, f, g};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_10(_BLI_STRING_ARGS_8)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_11(_BLI_STRING_ARGS_9)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_12(_BLI_STRING_ARGS_10)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
  return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
}

#undef _BLI_STRING_ARGS_0

/** \} */

/* ------------------------------------------------------------------------- */
/** \name Implement: `BLI_string_joinN(..)`
 * \{ */

/**
 * Join an array of strings into a newly allocated, null terminated string.
 */
char *BLI_string_join_arrayN(const char *strings[], uint strings_len) ATTR_WARN_UNUSED_RESULT
    ATTR_NONNULL();

#define BLI_string_joinN(...) VA_NARGS_CALL_OVERLOAD(_BLI_string_joinN_, __VA_ARGS__)

#define _BLI_STRING_ARGS_0

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();

BLI_INLINE char *_BLI_string_joinN_1(_BLI_STRING_ARGS_1)
{
  const char *string_array[] = {a};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_2(_BLI_STRING_ARGS_2)
{
  const char *string_array[] = {a, b};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_3(_BLI_STRING_ARGS_3)
{
  const char *string_array[] = {a, b, c};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_4(_BLI_STRING_ARGS_4)
{
  const char *string_array[] = {a, b, c, d};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_5(_BLI_STRING_ARGS_5)
{
  const char *string_array[] = {a, b, c, d, e};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_6(_BLI_STRING_ARGS_6)
{
  const char *string_array[] = {a, b, c, d, e, f};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_7(_BLI_STRING_ARGS_7)
{
  const char *string_array[] = {a, b, c, d, e, f, g};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_8(_BLI_STRING_ARGS_8)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_9(_BLI_STRING_ARGS_9)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_joinN_10(_BLI_STRING_ARGS_10)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
  return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
}

#undef _BLI_STRING_ARGS_0

/** \} */

/* ------------------------------------------------------------------------- */
/** \name Implement: `BLI_string_join_by_sep_char(..)`
 * \{ */

/**
 * A version of #BLI_string_join_array that takes a separator which can be any character
 * including '\0'.
 */
size_t BLI_string_join_array_by_sep_char(char *result,
                                         size_t result_len,
                                         char sep,
                                         const char *strings[],
                                         uint strings_len) ATTR_NONNULL();

#define BLI_string_join_by_sep_char(...) \
  VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_char_, __VA_ARGS__)

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

BLI_INLINE size_t _BLI_string_join_by_sep_char_4(_BLI_STRING_ARGS_1) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_5(_BLI_STRING_ARGS_2) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_6(_BLI_STRING_ARGS_3) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_7(_BLI_STRING_ARGS_4) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_8(_BLI_STRING_ARGS_5) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_9(_BLI_STRING_ARGS_6) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_10(_BLI_STRING_ARGS_7) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_11(_BLI_STRING_ARGS_8) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_12(_BLI_STRING_ARGS_9) ATTR_NONNULL();
BLI_INLINE size_t _BLI_string_join_by_sep_char_13(_BLI_STRING_ARGS_10) ATTR_NONNULL();

BLI_INLINE size_t _BLI_string_join_by_sep_char_4(_BLI_STRING_ARGS_1)
{
  const char *string_array[] = {a};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_5(_BLI_STRING_ARGS_2)
{
  const char *string_array[] = {a, b};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_6(_BLI_STRING_ARGS_3)
{
  const char *string_array[] = {a, b, c};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_7(_BLI_STRING_ARGS_4)
{
  const char *string_array[] = {a, b, c, d};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_8(_BLI_STRING_ARGS_5)
{
  const char *string_array[] = {a, b, c, d, e};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_9(_BLI_STRING_ARGS_6)
{
  const char *string_array[] = {a, b, c, d, e, f};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_10(_BLI_STRING_ARGS_7)
{
  const char *string_array[] = {a, b, c, d, e, f, g};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_11(_BLI_STRING_ARGS_8)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_12(_BLI_STRING_ARGS_9)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE size_t _BLI_string_join_by_sep_char_13(_BLI_STRING_ARGS_10)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
  return BLI_string_join_array_by_sep_char(
      dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
}

#undef _BLI_STRING_ARGS_0

/** \} */

/* ------------------------------------------------------------------------- */
/** \name Implement: `BLI_string_join_by_sep_charN(..)`
 * \{ */

/**
 * A version of #BLI_string_join_by_sep_char that takes a separator which can be any character
 * including '\0'.
 */
char *BLI_string_join_array_by_sep_charN(char sep,
                                         const char *strings[],
                                         uint strings_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();

#define BLI_string_join_by_sep_charN(...) \
  VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_charN_, __VA_ARGS__)

#define _BLI_STRING_ARGS_0 const char sep,

BLI_INLINE char *_BLI_string_join_by_sep_charN_2(_BLI_STRING_ARGS_1) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_3(_BLI_STRING_ARGS_2) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_4(_BLI_STRING_ARGS_3) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_5(_BLI_STRING_ARGS_4) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_6(_BLI_STRING_ARGS_5) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_7(_BLI_STRING_ARGS_6) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_8(_BLI_STRING_ARGS_7) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_9(_BLI_STRING_ARGS_8) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_10(_BLI_STRING_ARGS_9) ATTR_NONNULL();
BLI_INLINE char *_BLI_string_join_by_sep_charN_11(_BLI_STRING_ARGS_10) ATTR_NONNULL();

BLI_INLINE char *_BLI_string_join_by_sep_charN_2(_BLI_STRING_ARGS_1)
{
  const char *string_array[] = {a};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_3(_BLI_STRING_ARGS_2)
{
  const char *string_array[] = {a, b};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_4(_BLI_STRING_ARGS_3)
{
  const char *string_array[] = {a, b, c};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_5(_BLI_STRING_ARGS_4)
{
  const char *string_array[] = {a, b, c, d};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_6(_BLI_STRING_ARGS_5)
{
  const char *string_array[] = {a, b, c, d, e};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_7(_BLI_STRING_ARGS_6)
{
  const char *string_array[] = {a, b, c, d, e, f};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_8(_BLI_STRING_ARGS_7)
{
  const char *string_array[] = {a, b, c, d, e, f, g};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_9(_BLI_STRING_ARGS_8)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_10(_BLI_STRING_ARGS_9)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}
BLI_INLINE char *_BLI_string_join_by_sep_charN_11(_BLI_STRING_ARGS_10)
{
  const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
  return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
}

/** \} */

#undef _BLI_STRING_ARGS_0

#ifdef __cplusplus
}
#endif