Blender V5.0
BLI_string.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include <inttypes.h>
12#include <stdarg.h>
13
14#include "BLI_compiler_attrs.h"
15#include "BLI_utildefines.h"
16
17#ifdef __cplusplus
18# include <string>
19#endif
20
21/* Buffer size of maximum `uint64` plus commas and terminator. */
22#define BLI_STR_FORMAT_UINT64_GROUPED_SIZE 27
23
24/* Buffer size of maximum `int64` plus commas and terminator. */
25#define BLI_STR_FORMAT_INT64_GROUPED_SIZE 28
26
27/* Buffer size of maximum `int32` with commas and terminator. */
28#define BLI_STR_FORMAT_INT32_GROUPED_SIZE 15
29
30/* Buffer size of maximum `int64` formatted as byte size (with GiB for example). */
31#define BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE 15
32
33/* Buffer size of maximum `int64` formatted as byte size, minimum length (".1G" for example). */
34#define BLI_STR_FORMAT_INT64_BYTE_UNIT_COMPACT_SIZE 5
35
36/* Buffer size of maximum `int32` formatted as compact decimal size ("15.6M" for example). */
37#define BLI_STR_FORMAT_INT32_DECIMAL_UNIT_SIZE 7
38
39/* Buffer size of maximum `int32` formatted as very short decimal size ("15B" for example). */
40#define BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE 5
41
52
61
70
77char *BLI_strdupcat(const char *__restrict str1,
78 const char *__restrict str2) ATTR_WARN_UNUSED_RESULT
80
89char *BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
90 ATTR_NONNULL(1, 2);
91
102char *BLI_strncpy_ensure_pad(char *__restrict dst,
103 const char *__restrict src,
104 char pad,
105 size_t dst_maxncpy) ATTR_NONNULL(1, 2);
106
118size_t BLI_strncpy_rlen(char *__restrict dst,
119 const char *__restrict src,
120 size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
121
122char *BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
123 ATTR_NONNULL(1, 2);
124
131const char *BLI_strchr_or_end(const char *str,
133 ATTR_NONNULL(1);
134
147bool BLI_str_quoted_substr_range(const char *__restrict str,
148 const char *__restrict prefix,
149 int *__restrict r_start,
150 int *__restrict r_end) ATTR_WARN_UNUSED_RESULT
151 ATTR_NONNULL(1, 2, 3, 4);
152#if 0 /* UNUSED */
153char *BLI_str_quoted_substrN(const char *__restrict str,
154 const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT
156#endif
170bool BLI_str_quoted_substr(const char *__restrict str,
171 const char *__restrict prefix,
172 char *result,
173 size_t result_maxncpy);
174
178size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format, ...)
183size_t BLI_snprintf_rlen(char *__restrict dst,
184 size_t dst_maxncpy,
185 const char *__restrict format,
186 ...) ATTR_NONNULL(1, 3) ATTR_PRINTF_FORMAT(3, 4);
187
191size_t BLI_vsnprintf(char *__restrict dst,
192 size_t dst_maxncpy,
193 const char *__restrict format,
194 va_list arg) ATTR_PRINTF_FORMAT(3, 0);
198size_t BLI_vsnprintf_rlen(char *__restrict dst,
199 size_t dst_maxncpy,
200 const char *__restrict format,
201 va_list arg) ATTR_PRINTF_FORMAT(3, 0);
202
203char *BLI_sprintfN_with_buffer(char *fixed_buf,
204 size_t fixed_buf_size,
205 size_t *result_len,
206 const char *__restrict format,
209char *BLI_vsprintfN_with_buffer(char *fixed_buf,
210 size_t fixed_buf_size,
211 size_t *result_len,
212 const char *__restrict format,
213 va_list args) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 3, 4)
215
220char *BLI_sprintfN(const char *__restrict format, ...) ATTR_WARN_UNUSED_RESULT
223char *BLI_vsprintfN(const char *__restrict format, va_list args) ATTR_NONNULL(1, 2) ATTR_MALLOC
225
238size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
239 ATTR_NONNULL(1, 2);
240
241#ifdef __cplusplus
243std::string BLI_str_escape(const char *str);
244#endif
245
258size_t BLI_str_unescape_ex(char *__restrict dst,
259 const char *__restrict src,
260 size_t src_maxncpy,
261 /* Additional arguments. */
262 size_t dst_maxncpy,
263 bool *r_is_complete) ATTR_NONNULL(1, 2, 5);
274size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, size_t src_maxncpy)
275 ATTR_NONNULL(1, 2);
276
285const char *BLI_str_escape_find_quote(const char *str) ATTR_NONNULL(1);
286
296 ATTR_NONNULL(1);
306 ATTR_NONNULL(1);
308 ATTR_NONNULL(1);
320 long long int bytes,
321 bool base_10) ATTR_NONNULL(1);
322
346 long long int bytes,
347 bool base_10) ATTR_NONNULL(1);
348
368 int number_to_format) ATTR_NONNULL(1);
391 int number_to_format) ATTR_NONNULL(1);
397int BLI_strcaseeq(const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
401char *BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
405char *BLI_strncasestr(const char *s, const char *find, size_t len) ATTR_WARN_UNUSED_RESULT
406 ATTR_NONNULL(1, 2);
407int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
408int BLI_strncasecmp(const char *s1, const char *s2, size_t len) ATTR_WARN_UNUSED_RESULT
409 ATTR_NONNULL(1, 2);
414int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT
415 ATTR_NONNULL(1, 2);
420int BLI_strcmp_ignore_pad(const char *str1, const char *str2, char pad) ATTR_WARN_UNUSED_RESULT
421 ATTR_NONNULL(1, 2);
422
430size_t BLI_strnlen(const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
431
435
436void BLI_str_tolower_ascii(char *str, size_t len) ATTR_NONNULL(1);
437void BLI_str_toupper_ascii(char *str, size_t len) ATTR_NONNULL(1);
438
441
445void BLI_str_rstrip(char *str) ATTR_NONNULL(1);
456
465
474int BLI_str_index_in_array_n(const char *__restrict str,
475 const char **__restrict str_array,
476 int str_array_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
484int BLI_str_index_in_array(const char *__restrict str,
485 const char **__restrict str_array) ATTR_WARN_UNUSED_RESULT
486 ATTR_NONNULL(1, 2);
487
495bool BLI_str_startswith(const char *__restrict str,
496 const char *__restrict start) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
504bool BLI_str_endswith(const char *__restrict str, const char *__restrict end) ATTR_NONNULL(1, 2);
505bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, size_t str_len)
506 ATTR_NONNULL(1, 2);
507
518size_t BLI_str_partition(const char *str, const char delim[], const char **sep, const char **suf)
519 ATTR_NONNULL(1, 2, 3, 4);
530size_t BLI_str_rpartition(const char *str, const char delim[], const char **sep, const char **suf)
531 ATTR_NONNULL(1, 2, 3, 4);
544size_t BLI_str_partition_ex(const char *str,
545 const char *end,
546 const char delim[],
547 const char **sep,
548 const char **suf,
549 bool from_right) ATTR_NONNULL(1, 3, 4, 5);
550
552bool BLI_string_has_word_prefix(const char *haystack,
553 const char *needle,
554 size_t needle_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
556 const char *str,
557 int (*words)[2],
558 int words_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
559
571 size_t str_maxlen,
572 char delim,
573 int r_words[][2],
574 int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 4);
575
593bool BLI_string_elem_split_by_delim(const char *haystack,
594 const char delim,
595 const char *needle) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 3);
596
597/* -------------------------------------------------------------------- */
602
603#define STRNCPY_RLEN(dst, src) BLI_strncpy_rlen(dst, src, ARRAY_SIZE(dst))
604#define SNPRINTF(dst, format, ...) BLI_snprintf(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
605#define SNPRINTF_RLEN(dst, format, ...) \
606 BLI_snprintf_rlen(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
607#define VSNPRINTF(dst, format, args) BLI_vsnprintf(dst, ARRAY_SIZE(dst), format, args)
608#define VSNPRINTF_RLEN(dst, format, args) BLI_vsnprintf_rlen(dst, ARRAY_SIZE(dst), format, args)
609#define STR_CONCAT(dst, len, suffix) \
610 len += BLI_strncpy_rlen(dst + len, suffix, ARRAY_SIZE(dst) - len)
611#define STR_CONCATF(dst, len, format, ...) \
612 len += BLI_snprintf_rlen(dst + len, ARRAY_SIZE(dst) - len, format, __VA_ARGS__)
613#define STRNLEN(str) BLI_strnlen(str, ARRAY_SIZE(str))
614
616
617/* -------------------------------------------------------------------- */
622
623/* Manual line breaks for readability. */
624/* clang-format off */
625/* STR_ELEM#(v, ...): is the first arg equal any others? */
626/* Internal helpers. */
627#define _VA_STR_ELEM2(v, a) (strcmp(v, a) == 0)
628#define _VA_STR_ELEM3(v, a, b) \
629 (_VA_STR_ELEM2(v, a) || (_VA_STR_ELEM2(v, b)))
630#define _VA_STR_ELEM4(v, a, b, c) \
631 (_VA_STR_ELEM3(v, a, b) || (_VA_STR_ELEM2(v, c)))
632#define _VA_STR_ELEM5(v, a, b, c, d) \
633 (_VA_STR_ELEM4(v, a, b, c) || (_VA_STR_ELEM2(v, d)))
634#define _VA_STR_ELEM6(v, a, b, c, d, e) \
635 (_VA_STR_ELEM5(v, a, b, c, d) || (_VA_STR_ELEM2(v, e)))
636#define _VA_STR_ELEM7(v, a, b, c, d, e, f) \
637 (_VA_STR_ELEM6(v, a, b, c, d, e) || (_VA_STR_ELEM2(v, f)))
638#define _VA_STR_ELEM8(v, a, b, c, d, e, f, g) \
639 (_VA_STR_ELEM7(v, a, b, c, d, e, f) || (_VA_STR_ELEM2(v, g)))
640#define _VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) \
641 (_VA_STR_ELEM8(v, a, b, c, d, e, f, g) || (_VA_STR_ELEM2(v, h)))
642#define _VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) \
643 (_VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) || (_VA_STR_ELEM2(v, i)))
644#define _VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) \
645 (_VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) || (_VA_STR_ELEM2(v, j)))
646#define _VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) \
647 (_VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) || (_VA_STR_ELEM2(v, k)))
648#define _VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) \
649 (_VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) || (_VA_STR_ELEM2(v, l)))
650#define _VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) \
651 (_VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) || (_VA_STR_ELEM2(v, m)))
652#define _VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
653 (_VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) || (_VA_STR_ELEM2(v, n)))
654#define _VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \
655 (_VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) || (_VA_STR_ELEM2(v, o)))
656#define _VA_STR_ELEM17(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \
657 (_VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) || (_VA_STR_ELEM2(v, p)))
658/* clang-format on */
659
660/* reusable STR_ELEM macro */
661#define STR_ELEM(...) VA_NARGS_CALL_OVERLOAD(_VA_STR_ELEM, __VA_ARGS__)
662
664
665/* -------------------------------------------------------------------- */
668#ifdef WITH_STRSIZE_DEBUG
669# define BLI_string_debug_size(str, str_maxncpy) memset(str, 0xff, sizeof(*(str)) * str_maxncpy)
674void BLI_string_debug_size_after_nil(char *str, size_t str_maxncpy);
675#else
676# define BLI_string_debug_size(str, str_maxncpy) \
677 if (0) { \
678 (void)str, (void)str_maxncpy; \
679 } \
680 ((void)0)
681# define BLI_string_debug_size_after_nil(str, str_maxncpy) BLI_string_debug_size(str, str_maxncpy)
682#endif /* !WITH_STRSIZE_DEBUG */
683
685
693template<size_t N> inline char *STRNCPY(char (&dst)[N], const char *src)
694{
695 return BLI_strncpy(dst, src, N);
696}
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_MALLOC
#define ATTR_RETURNS_NONNULL
#define ATTR_PRINTF_FORMAT(format_param, dots_param)
#define ATTR_NONNULL(...)
ATTR_WARN_UNUSED_RESULT const size_t num
char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
Definition string.cc:41
size_t size_t BLI_str_unescape_ex(char *__restrict dst, const char *__restrict src, size_t src_maxncpy, size_t dst_maxncpy, bool *r_is_complete) ATTR_NONNULL(1
char BLI_tolower_ascii(const char c) ATTR_WARN_UNUSED_RESULT
Definition string.cc:946
int bool BLI_str_startswith(const char *__restrict str, const char *__restrict start) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int BLI_str_index_in_array_n(const char *__restrict str, const char **__restrict str_array, int str_array_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition string.cc:846
size_t BLI_str_format_int_grouped(char dst[BLI_STR_FORMAT_INT32_GROUPED_SIZE], int num) ATTR_NONNULL(1)
Definition string.cc:1171
size_t size_t size_t const char * BLI_str_escape_find_quote(const char *str) ATTR_NONNULL(1)
Definition string.cc:438
int char char int int BLI_strncasecmp(const char *s1, const char *s2, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
size_t size_t BLI_vsnprintf_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format, va_list arg) ATTR_PRINTF_FORMAT(3
char * BLI_strdupcat(const char *__restrict str1, const char *__restrict str2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define BLI_STR_FORMAT_INT64_GROUPED_SIZE
Definition BLI_string.h:25
void BLI_str_rstrip(char *str) ATTR_NONNULL(1)
Definition string.cc:980
int bool bool bool size_t BLI_str_partition(const char *str, const char delim[], const char **sep, const char **suf) ATTR_NONNULL(1
void BLI_str_toupper_ascii(char *str, size_t len) ATTR_NONNULL(1)
Definition string.cc:965
int bool bool bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, size_t str_len) ATTR_NONNULL(1
char * BLI_vsprintfN_with_buffer(char *fixed_buf, size_t fixed_buf_size, size_t *result_len, const char *__restrict format, va_list args) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int bool bool bool size_t size_t size_t int BLI_string_max_possible_word_count(int str_len) ATTR_WARN_UNUSED_RESULT
Definition string.cc:573
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition string.cc:30
char char size_t char const char * BLI_strchr_or_end(const char *str, char ch) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1)
Definition string.cc:931
size_t size_t size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, size_t src_maxncpy) ATTR_NONNULL(1
#define BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE
Definition BLI_string.h:31
bool BLI_str_quoted_substr_range(const char *__restrict str, const char *__restrict prefix, int *__restrict r_start, int *__restrict r_end) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int BLI_str_rstrip_digits(char *str) ATTR_NONNULL()
Definition string.cc:1012
int char char int int int int size_t BLI_strnlen(const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition string.cc:913
char char * BLI_vsprintfN(const char *__restrict format, va_list args) ATTR_NONNULL(1
char * BLI_strdup_null(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_MALLOC
Definition string.cc:46
char BLI_toupper_ascii(const char c) ATTR_WARN_UNUSED_RESULT
Definition string.cc:951
#define BLI_STR_FORMAT_INT32_DECIMAL_UNIT_SIZE
Definition BLI_string.h:37
#define BLI_string_debug_size_after_nil(str, str_maxncpy)
Definition BLI_string.h:681
#define BLI_STR_FORMAT_INT32_GROUPED_SIZE
Definition BLI_string.h:28
void BLI_str_format_byte_unit(char dst[BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE], long long int bytes, bool base_10) ATTR_NONNULL(1)
Definition string.cc:1207
size_t size_t char * BLI_sprintfN_with_buffer(char *fixed_buf, size_t fixed_buf_size, size_t *result_len, const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
size_t BLI_str_format_int64_grouped(char dst[BLI_STR_FORMAT_INT64_GROUPED_SIZE], int64_t num) ATTR_NONNULL(1)
Definition string.cc:1195
bool bool BLI_string_all_words_matched(const char *name, const char *str, int(*words)[2], int words_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int BLI_str_rstrip_float_zero(char *str, char pad) ATTR_NONNULL(1)
Definition string.cc:992
int bool bool bool size_t size_t BLI_str_rpartition(const char *str, const char delim[], const char **sep, const char **suf) ATTR_NONNULL(1
#define BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE
Definition BLI_string.h:40
bool BLI_string_has_word_prefix(const char *haystack, const char *needle, size_t needle_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define BLI_STR_FORMAT_UINT64_GROUPED_SIZE
Definition BLI_string.h:22
char char size_t char * BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
size_t BLI_snprintf_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
int char char int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void BLI_str_format_integer_unit(char dst[BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE], int number_to_format) ATTR_NONNULL(1)
Definition string.cc:1294
int char char int int int int BLI_strcmp_ignore_pad(const char *str1, const char *str2, char pad) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int char char * BLI_strncasestr(const char *s, const char *find, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void BLI_str_format_byte_unit_compact(char dst[BLI_STR_FORMAT_INT64_BYTE_UNIT_COMPACT_SIZE], long long int bytes, bool base_10) ATTR_NONNULL(1)
Definition string.cc:1237
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:693
int bool bool bool size_t size_t size_t BLI_str_partition_ex(const char *str, const char *end, const char delim[], const char **sep, const char **suf, bool from_right) ATTR_NONNULL(1
void BLI_str_format_decimal_unit(char dst[BLI_STR_FORMAT_INT32_DECIMAL_UNIT_SIZE], int number_to_format) ATTR_NONNULL(1)
Definition string.cc:1270
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
int char char int int int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
size_t BLI_str_format_uint64_grouped(char dst[BLI_STR_FORMAT_UINT64_GROUPED_SIZE], uint64_t num) ATTR_NONNULL(1)
Definition string.cc:1183
char char * BLI_strncpy_ensure_pad(char *__restrict dst, const char *__restrict src, char pad, size_t dst_maxncpy) ATTR_NONNULL(1
int BLI_strcaseeq(const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void BLI_str_tolower_ascii(char *str, size_t len) ATTR_NONNULL(1)
Definition string.cc:956
bool bool int bool BLI_string_elem_split_by_delim(const char *haystack, const char delim, const char *needle) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
size_t BLI_vsnprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format, va_list arg) ATTR_PRINTF_FORMAT(3
int bool bool BLI_str_endswith(const char *__restrict str, const char *__restrict end) ATTR_NONNULL(1
bool bool int BLI_string_find_split_words(const char *str, size_t str_maxlen, char delim, int r_words[][2], int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char char size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int BLI_str_index_in_array(const char *__restrict str, const char **__restrict str_array) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int char * BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define BLI_STR_FORMAT_INT64_BYTE_UNIT_COMPACT_SIZE
Definition BLI_string.h:34
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxncpy)
Definition string.cc:521
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
int pad[32 - sizeof(int)]
long long int int64_t
unsigned long long int uint64_t
#define str(s)
format
#define N
const char * name
uint len