Blender V4.5
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 `int32` with commas and terminator. */
25#define BLI_STR_FORMAT_INT32_GROUPED_SIZE 15
26
27/* Buffer size of maximum `int64` formatted as byte size (with GiB for example). */
28#define BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE 15
29
30/* Buffer size of maximum `int64` formatted as byte size, minimum length (".1G" for example). */
31#define BLI_STR_FORMAT_INT64_BYTE_UNIT_COMPACT_SIZE 5
32
33/* Buffer size of maximum `int32` formatted as compact decimal size ("15.6M" for example). */
34#define BLI_STR_FORMAT_INT32_DECIMAL_UNIT_SIZE 7
35
36/* Buffer size of maximum `int32` formatted as very short decimal size ("15B" for example). */
37#define BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE 5
38
49
58
67
74char *BLI_strdupcat(const char *__restrict str1,
75 const char *__restrict str2) ATTR_WARN_UNUSED_RESULT
77
86char *BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
87 ATTR_NONNULL(1, 2);
88
99char *BLI_strncpy_ensure_pad(char *__restrict dst,
100 const char *__restrict src,
101 char pad,
102 size_t dst_maxncpy) ATTR_NONNULL(1, 2);
103
115size_t BLI_strncpy_rlen(char *__restrict dst,
116 const char *__restrict src,
117 size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
118
119char *BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
120 ATTR_NONNULL(1, 2);
121
128const char *BLI_strchr_or_end(const char *str,
130 ATTR_NONNULL(1);
131
144bool BLI_str_quoted_substr_range(const char *__restrict str,
145 const char *__restrict prefix,
146 int *__restrict r_start,
147 int *__restrict r_end) ATTR_WARN_UNUSED_RESULT
148 ATTR_NONNULL(1, 2, 3, 4);
149#if 0 /* UNUSED */
150char *BLI_str_quoted_substrN(const char *__restrict str,
151 const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT
153#endif
167bool BLI_str_quoted_substr(const char *__restrict str,
168 const char *__restrict prefix,
169 char *result,
170 size_t result_maxncpy);
171
175size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format, ...)
180size_t BLI_snprintf_rlen(char *__restrict dst,
181 size_t dst_maxncpy,
182 const char *__restrict format,
183 ...) ATTR_NONNULL(1, 3) ATTR_PRINTF_FORMAT(3, 4);
184
188size_t BLI_vsnprintf(char *__restrict dst,
189 size_t dst_maxncpy,
190 const char *__restrict format,
191 va_list arg) ATTR_PRINTF_FORMAT(3, 0);
195size_t BLI_vsnprintf_rlen(char *__restrict dst,
196 size_t dst_maxncpy,
197 const char *__restrict format,
198 va_list arg) ATTR_PRINTF_FORMAT(3, 0);
199
200char *BLI_sprintfN_with_buffer(char *fixed_buf,
201 size_t fixed_buf_size,
202 size_t *result_len,
203 const char *__restrict format,
206char *BLI_vsprintfN_with_buffer(char *fixed_buf,
207 size_t fixed_buf_size,
208 size_t *result_len,
209 const char *__restrict format,
210 va_list args) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 3, 4)
212
217char *BLI_sprintfN(const char *__restrict format, ...) ATTR_WARN_UNUSED_RESULT
220char *BLI_vsprintfN(const char *__restrict format, va_list args) ATTR_NONNULL(1, 2) ATTR_MALLOC
222
235size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
236 ATTR_NONNULL(1, 2);
237
238#ifdef __cplusplus
240std::string BLI_str_escape(const char *str);
241#endif
242
255size_t BLI_str_unescape_ex(char *__restrict dst,
256 const char *__restrict src,
257 size_t src_maxncpy,
258 /* Additional arguments. */
259 size_t dst_maxncpy,
260 bool *r_is_complete) ATTR_NONNULL(1, 2, 5);
271size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, size_t src_maxncpy)
272 ATTR_NONNULL(1, 2);
273
282const char *BLI_str_escape_find_quote(const char *str) ATTR_NONNULL(1);
283
293 ATTR_NONNULL(1);
303 ATTR_NONNULL(1);
315 long long int bytes,
316 bool base_10) ATTR_NONNULL(1);
317
341 long long int bytes,
342 bool base_10) ATTR_NONNULL(1);
343
363 int number_to_format) ATTR_NONNULL(1);
386 int number_to_format) ATTR_NONNULL(1);
392int BLI_strcaseeq(const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
396char *BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
400char *BLI_strncasestr(const char *s, const char *find, size_t len) ATTR_WARN_UNUSED_RESULT
401 ATTR_NONNULL(1, 2);
402int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
403int BLI_strncasecmp(const char *s1, const char *s2, size_t len) ATTR_WARN_UNUSED_RESULT
404 ATTR_NONNULL(1, 2);
409int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT
410 ATTR_NONNULL(1, 2);
415int BLI_strcmp_ignore_pad(const char *str1, const char *str2, char pad) ATTR_WARN_UNUSED_RESULT
416 ATTR_NONNULL(1, 2);
417
425size_t BLI_strnlen(const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
426
430
431void BLI_str_tolower_ascii(char *str, size_t len) ATTR_NONNULL(1);
432void BLI_str_toupper_ascii(char *str, size_t len) ATTR_NONNULL(1);
433
436
440void BLI_str_rstrip(char *str) ATTR_NONNULL(1);
451
460
469int BLI_str_index_in_array_n(const char *__restrict str,
470 const char **__restrict str_array,
471 int str_array_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
479int BLI_str_index_in_array(const char *__restrict str,
480 const char **__restrict str_array) ATTR_WARN_UNUSED_RESULT
481 ATTR_NONNULL(1, 2);
482
490bool BLI_str_startswith(const char *__restrict str,
491 const char *__restrict start) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
499bool BLI_str_endswith(const char *__restrict str, const char *__restrict end) ATTR_NONNULL(1, 2);
500bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, size_t str_len)
501 ATTR_NONNULL(1, 2);
502
513size_t BLI_str_partition(const char *str, const char delim[], const char **sep, const char **suf)
514 ATTR_NONNULL(1, 2, 3, 4);
525size_t BLI_str_rpartition(const char *str, const char delim[], const char **sep, const char **suf)
526 ATTR_NONNULL(1, 2, 3, 4);
539size_t BLI_str_partition_ex(const char *str,
540 const char *end,
541 const char delim[],
542 const char **sep,
543 const char **suf,
544 bool from_right) ATTR_NONNULL(1, 3, 4, 5);
545
547bool BLI_string_has_word_prefix(const char *haystack,
548 const char *needle,
549 size_t needle_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
550bool BLI_string_all_words_matched(const char *name,
551 const char *str,
552 int (*words)[2],
553 int words_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
554
566 size_t str_maxlen,
567 char delim,
568 int r_words[][2],
569 int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 4);
570
588bool BLI_string_elem_split_by_delim(const char *haystack,
589 const char delim,
590 const char *needle) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 3);
591
592/* -------------------------------------------------------------------- */
597
598#define STRNCPY_RLEN(dst, src) BLI_strncpy_rlen(dst, src, ARRAY_SIZE(dst))
599#define SNPRINTF(dst, format, ...) BLI_snprintf(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
600#define SNPRINTF_RLEN(dst, format, ...) \
601 BLI_snprintf_rlen(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
602#define VSNPRINTF(dst, format, args) BLI_vsnprintf(dst, ARRAY_SIZE(dst), format, args)
603#define VSNPRINTF_RLEN(dst, format, args) BLI_vsnprintf_rlen(dst, ARRAY_SIZE(dst), format, args)
604#define STR_CONCAT(dst, len, suffix) \
605 len += BLI_strncpy_rlen(dst + len, suffix, ARRAY_SIZE(dst) - len)
606#define STR_CONCATF(dst, len, format, ...) \
607 len += BLI_snprintf_rlen(dst + len, ARRAY_SIZE(dst) - len, format, __VA_ARGS__)
608#define STRNLEN(str) BLI_strnlen(str, ARRAY_SIZE(str))
609
611
612/* -------------------------------------------------------------------- */
617
618/* Manual line breaks for readability. */
619/* clang-format off */
620/* STR_ELEM#(v, ...): is the first arg equal any others? */
621/* Internal helpers. */
622#define _VA_STR_ELEM2(v, a) (strcmp(v, a) == 0)
623#define _VA_STR_ELEM3(v, a, b) \
624 (_VA_STR_ELEM2(v, a) || (_VA_STR_ELEM2(v, b)))
625#define _VA_STR_ELEM4(v, a, b, c) \
626 (_VA_STR_ELEM3(v, a, b) || (_VA_STR_ELEM2(v, c)))
627#define _VA_STR_ELEM5(v, a, b, c, d) \
628 (_VA_STR_ELEM4(v, a, b, c) || (_VA_STR_ELEM2(v, d)))
629#define _VA_STR_ELEM6(v, a, b, c, d, e) \
630 (_VA_STR_ELEM5(v, a, b, c, d) || (_VA_STR_ELEM2(v, e)))
631#define _VA_STR_ELEM7(v, a, b, c, d, e, f) \
632 (_VA_STR_ELEM6(v, a, b, c, d, e) || (_VA_STR_ELEM2(v, f)))
633#define _VA_STR_ELEM8(v, a, b, c, d, e, f, g) \
634 (_VA_STR_ELEM7(v, a, b, c, d, e, f) || (_VA_STR_ELEM2(v, g)))
635#define _VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) \
636 (_VA_STR_ELEM8(v, a, b, c, d, e, f, g) || (_VA_STR_ELEM2(v, h)))
637#define _VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) \
638 (_VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) || (_VA_STR_ELEM2(v, i)))
639#define _VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) \
640 (_VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) || (_VA_STR_ELEM2(v, j)))
641#define _VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) \
642 (_VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) || (_VA_STR_ELEM2(v, k)))
643#define _VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) \
644 (_VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) || (_VA_STR_ELEM2(v, l)))
645#define _VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) \
646 (_VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) || (_VA_STR_ELEM2(v, m)))
647#define _VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
648 (_VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) || (_VA_STR_ELEM2(v, n)))
649#define _VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \
650 (_VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) || (_VA_STR_ELEM2(v, o)))
651#define _VA_STR_ELEM17(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \
652 (_VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) || (_VA_STR_ELEM2(v, p)))
653/* clang-format on */
654
655/* reusable STR_ELEM macro */
656#define STR_ELEM(...) VA_NARGS_CALL_OVERLOAD(_VA_STR_ELEM, __VA_ARGS__)
657
659
660/* -------------------------------------------------------------------- */
663#ifdef WITH_STRSIZE_DEBUG
664# define BLI_string_debug_size(str, str_maxncpy) memset(str, 0xff, sizeof(*(str)) * str_maxncpy)
669void BLI_string_debug_size_after_nil(char *str, size_t str_maxncpy);
670#else
671# define BLI_string_debug_size(str, str_maxncpy) \
672 if (0) { \
673 (void)str, (void)str_maxncpy; \
674 } \
675 ((void)0)
676# define BLI_string_debug_size_after_nil(str, str_maxncpy) BLI_string_debug_size(str, str_maxncpy)
677#endif /* !WITH_STRSIZE_DEBUG */
678
680
688template<size_t N> inline char *STRNCPY(char (&dst)[N], const char *src)
689{
690 return BLI_strncpy(dst, src, N);
691}
#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:956
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:856
size_t BLI_str_format_int_grouped(char dst[BLI_STR_FORMAT_INT32_GROUPED_SIZE], int num) ATTR_NONNULL(1)
Definition string.cc:1181
size_t size_t size_t const char * BLI_str_escape_find_quote(const char *str) ATTR_NONNULL(1)
Definition string.cc:448
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
void BLI_str_rstrip(char *str) ATTR_NONNULL(1)
Definition string.cc:990
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:975
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:583
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:941
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:28
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:1022
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:923
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:961
#define BLI_STR_FORMAT_INT32_DECIMAL_UNIT_SIZE
Definition BLI_string.h:34
#define BLI_string_debug_size_after_nil(str, str_maxncpy)
Definition BLI_string.h:676
#define BLI_STR_FORMAT_INT32_GROUPED_SIZE
Definition BLI_string.h:25
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:1205
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
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:1002
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:37
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:1292
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:1235
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:688
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:1268
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:1193
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:966
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:31
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxncpy)
Definition string.cc:531
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)]
unsigned long long int uint64_t
#define str(s)
format
#define N
uint len