Blender V5.3
BLI_string.hh
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#include <string>
14
15#include "BLI_compiler_attrs.hh"
16#include "BLI_string_ref.hh"
17#include "BLI_utildefines.hh"
18
19namespace blender {
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
107char *BLI_strncpy_ensure_pad(char *__restrict dst,
108 const char *__restrict src,
109 char pad,
110 size_t dst_maxncpy) ATTR_NONNULL(1, 2);
111
123size_t BLI_strncpy_rlen(char *__restrict dst,
124 const char *__restrict src,
125 size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
126
127char *BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
128 ATTR_NONNULL(1, 2);
129
136const char *BLI_strchr_or_end(const char *str,
138 ATTR_NONNULL(1);
139
152bool BLI_str_quoted_substr_range(const char *__restrict str,
153 const char *__restrict prefix,
154 int *__restrict r_start,
155 int *__restrict r_end) ATTR_WARN_UNUSED_RESULT
156 ATTR_NONNULL(1, 2, 3, 4);
157#if 0 /* UNUSED */
158char *BLI_str_quoted_substrN(const char *__restrict str,
159 const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT
161#endif
175bool BLI_str_quoted_substr(const char *__restrict str,
176 const char *__restrict prefix,
177 char *result,
178 size_t result_maxncpy);
179
183size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format, ...)
188size_t BLI_snprintf_rlen(char *__restrict dst,
189 size_t dst_maxncpy,
190 const char *__restrict format,
191 ...) ATTR_NONNULL(1, 3) ATTR_PRINTF_FORMAT(3, 4);
192
196size_t BLI_vsnprintf(char *__restrict dst,
197 size_t dst_maxncpy,
198 const char *__restrict format,
199 va_list arg) ATTR_PRINTF_FORMAT(3, 0);
203size_t BLI_vsnprintf_rlen(char *__restrict dst,
204 size_t dst_maxncpy,
205 const char *__restrict format,
206 va_list arg) ATTR_PRINTF_FORMAT(3, 0);
207
208char *BLI_sprintfN_with_buffer(char *fixed_buf,
209 size_t fixed_buf_maxncpy,
210 size_t *result_len,
211 const char *__restrict format,
214char *BLI_vsprintfN_with_buffer(char *fixed_buf,
215 size_t fixed_buf_maxncpy,
216 size_t *result_len,
217 const char *__restrict format,
218 va_list args) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 3, 4)
220
225char *BLI_sprintfN(const char *__restrict format, ...) ATTR_WARN_UNUSED_RESULT
228char *BLI_vsprintfN(const char *__restrict format, va_list args) ATTR_NONNULL(1) ATTR_MALLOC
229 ATTR_PRINTF_FORMAT(1, 0);
230
243size_t BLI_str_escape(char *__restrict dst, StringRef src, size_t dst_maxncpy) ATTR_NONNULL(1);
244
246std::string BLI_str_escape(StringRef str);
247
260size_t BLI_str_unescape_ex(char *__restrict dst,
261 const char *__restrict src,
262 size_t src_len,
263 /* Additional arguments. */
264 size_t dst_maxncpy,
265 bool *r_is_complete) ATTR_NONNULL(1, 2, 5);
276size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, size_t src_len)
277 ATTR_NONNULL(1, 2);
278
287const char *BLI_str_escape_find_quote(const char *str) ATTR_NONNULL(1);
288
298 ATTR_NONNULL(1);
308 ATTR_NONNULL(1);
310 ATTR_NONNULL(1);
322 long long int bytes,
323 bool base_10) ATTR_NONNULL(1);
324
348 long long int bytes,
349 bool base_10) ATTR_NONNULL(1);
350
370 int number_to_format) ATTR_NONNULL(1);
393 int number_to_format) ATTR_NONNULL(1);
399int BLI_strcaseeq(const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
403char *BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
407char *BLI_strncasestr(const char *s, const char *find, size_t len) ATTR_WARN_UNUSED_RESULT
408 ATTR_NONNULL(1, 2);
409int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
410int BLI_strncasecmp(const char *s1, const char *s2, size_t len) ATTR_WARN_UNUSED_RESULT
411 ATTR_NONNULL(1, 2);
416int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT
417 ATTR_NONNULL(1, 2);
422int BLI_strcmp_ignore_pad(const char *str1, const char *str2, char pad) ATTR_WARN_UNUSED_RESULT
423 ATTR_NONNULL(1, 2);
424
432size_t BLI_strnlen(const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
433
437
438void BLI_str_tolower_ascii(char *str, size_t len) ATTR_NONNULL(1);
439void BLI_str_toupper_ascii(char *str, size_t len) ATTR_NONNULL(1);
440
443
447void BLI_str_rstrip(char *str) ATTR_NONNULL(1);
458
467
476int BLI_str_index_in_array_n(const char *__restrict str,
477 const char **__restrict str_array,
478 int str_array_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
486int BLI_str_index_in_array(const char *__restrict str,
487 const char **__restrict str_array) ATTR_WARN_UNUSED_RESULT
488 ATTR_NONNULL(1, 2);
489
497bool BLI_str_startswith(const char *__restrict str,
498 const char *__restrict start) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
506bool BLI_str_endswith(const char *__restrict str, const char *__restrict end) ATTR_NONNULL(1, 2);
507bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, size_t str_len)
508 ATTR_NONNULL(1, 2);
509
520size_t BLI_str_partition(const char *str, const char delim[], const char **sep, const char **suf)
521 ATTR_NONNULL(1, 2, 3, 4);
532size_t BLI_str_rpartition(const char *str, const char delim[], const char **sep, const char **suf)
533 ATTR_NONNULL(1, 2, 3, 4);
546size_t BLI_str_partition_ex(const char *str,
547 const char *end,
548 const char delim[],
549 const char **sep,
550 const char **suf,
551 bool from_right) ATTR_NONNULL(1, 3, 4, 5);
552
554bool BLI_string_has_word_prefix(const char *haystack,
555 const char *needle,
556 size_t needle_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
557bool BLI_string_all_words_matched(const char *name,
558 const char *str,
559 int (*words)[2],
560 int words_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
561
572int BLI_string_find_split_words(const char *str,
573 size_t str_maxlen,
574 char delim,
575 int r_words[][2],
576 int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 4);
577
595bool BLI_string_elem_split_by_delim(const char *haystack,
596 const char delim,
597 const char *needle) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 3);
598
599/* -------------------------------------------------------------------- */
604
605#define STRNCPY_RLEN(dst, src) BLI_strncpy_rlen(dst, src, ARRAY_SIZE(dst))
606#define SNPRINTF(dst, format, ...) BLI_snprintf(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
607#define SNPRINTF_RLEN(dst, format, ...) \
608 BLI_snprintf_rlen(dst, ARRAY_SIZE(dst), format, __VA_ARGS__)
609#define VSNPRINTF(dst, format, args) BLI_vsnprintf(dst, ARRAY_SIZE(dst), format, args)
610#define VSNPRINTF_RLEN(dst, format, args) BLI_vsnprintf_rlen(dst, ARRAY_SIZE(dst), format, args)
611#define STR_CONCAT(dst, len, suffix) \
612 len += BLI_strncpy_rlen(dst + len, suffix, ARRAY_SIZE(dst) - len)
613#define STR_CONCATF(dst, len, format, ...) \
614 len += BLI_snprintf_rlen(dst + len, ARRAY_SIZE(dst) - len, format, __VA_ARGS__)
615#define STRNLEN(str) BLI_strnlen(str, ARRAY_SIZE(str))
616
618
619/* -------------------------------------------------------------------- */
624
625/* Manual line breaks for readability. */
626/* clang-format off */
627/* STR_ELEM#(v, ...): is the first arg equal any others? */
628/* Internal helpers. */
629#define _VA_STR_ELEM2(v, a) (strcmp(v, a) == 0)
630#define _VA_STR_ELEM3(v, a, b) \
631 (_VA_STR_ELEM2(v, a) || (_VA_STR_ELEM2(v, b)))
632#define _VA_STR_ELEM4(v, a, b, c) \
633 (_VA_STR_ELEM3(v, a, b) || (_VA_STR_ELEM2(v, c)))
634#define _VA_STR_ELEM5(v, a, b, c, d) \
635 (_VA_STR_ELEM4(v, a, b, c) || (_VA_STR_ELEM2(v, d)))
636#define _VA_STR_ELEM6(v, a, b, c, d, e) \
637 (_VA_STR_ELEM5(v, a, b, c, d) || (_VA_STR_ELEM2(v, e)))
638#define _VA_STR_ELEM7(v, a, b, c, d, e, f) \
639 (_VA_STR_ELEM6(v, a, b, c, d, e) || (_VA_STR_ELEM2(v, f)))
640#define _VA_STR_ELEM8(v, a, b, c, d, e, f, g) \
641 (_VA_STR_ELEM7(v, a, b, c, d, e, f) || (_VA_STR_ELEM2(v, g)))
642#define _VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) \
643 (_VA_STR_ELEM8(v, a, b, c, d, e, f, g) || (_VA_STR_ELEM2(v, h)))
644#define _VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) \
645 (_VA_STR_ELEM9(v, a, b, c, d, e, f, g, h) || (_VA_STR_ELEM2(v, i)))
646#define _VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) \
647 (_VA_STR_ELEM10(v, a, b, c, d, e, f, g, h, i) || (_VA_STR_ELEM2(v, j)))
648#define _VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) \
649 (_VA_STR_ELEM11(v, a, b, c, d, e, f, g, h, i, j) || (_VA_STR_ELEM2(v, k)))
650#define _VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) \
651 (_VA_STR_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) || (_VA_STR_ELEM2(v, l)))
652#define _VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) \
653 (_VA_STR_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) || (_VA_STR_ELEM2(v, m)))
654#define _VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
655 (_VA_STR_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) || (_VA_STR_ELEM2(v, n)))
656#define _VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \
657 (_VA_STR_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) || (_VA_STR_ELEM2(v, o)))
658#define _VA_STR_ELEM17(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \
659 (_VA_STR_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) || (_VA_STR_ELEM2(v, p)))
660/* clang-format on */
661
662/* reusable STR_ELEM macro */
663#define STR_ELEM(...) VA_NARGS_CALL_OVERLOAD(_VA_STR_ELEM, __VA_ARGS__)
664
666
667/* -------------------------------------------------------------------- */
670#ifdef WITH_STRSIZE_DEBUG
671# define BLI_string_debug_size(str, str_maxncpy) memset(str, 0xff, sizeof(*(str)) * (str_maxncpy))
676void BLI_string_debug_size_after_nil(char *str, size_t str_maxncpy);
677#else
678# define BLI_string_debug_size(str, str_maxncpy) \
679 if (0) { \
680 (void)(str), (void)(str_maxncpy); \
681 } \
682 ((void)0)
683# define BLI_string_debug_size_after_nil(str, str_maxncpy) BLI_string_debug_size(str, str_maxncpy)
684#endif /* !WITH_STRSIZE_DEBUG */
685
687
695template<size_t N> inline char *STRNCPY(char (&dst)[N], const char *src)
696{
697 return BLI_strncpy(dst, src, N);
698}
699
700} // namespace blender
#define ATTR_MALLOC
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
#define BLI_STR_FORMAT_INT64_GROUPED_SIZE
Definition BLI_string.hh:25
#define BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE
Definition BLI_string.hh:31
#define BLI_STR_FORMAT_INT32_DECIMAL_UNIT_SIZE
Definition BLI_string.hh:37
#define BLI_string_debug_size_after_nil(str, str_maxncpy)
#define BLI_STR_FORMAT_INT32_GROUPED_SIZE
Definition BLI_string.hh:28
#define BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE
Definition BLI_string.hh:40
#define BLI_STR_FORMAT_UINT64_GROUPED_SIZE
Definition BLI_string.hh:22
#define BLI_STR_FORMAT_INT64_BYTE_UNIT_COMPACT_SIZE
Definition BLI_string.hh:34
int pad[32 - sizeof(int)]
#define str(s)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263
#define N
BMesh Iterators.
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)
Object ATTR_RETURNS_NONNULL
int char char int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT 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)
unsigned __int64 uint64_t
Definition BKE_text.h:91
__int64 int64_t
Definition BKE_text.h:90
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * STRNCPY(char(&dst)[N], const char *src)
size_t BLI_vsnprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format, va_list arg) ATTR_PRINTF_FORMAT(3
void BLI_str_toupper_ascii(char *str, size_t len) 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
int bool bool bool size_t BLI_str_partition(const char *str, const char delim[], const char **sep, const char **suf) ATTR_NONNULL(1
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxncpy)
int bool bool BLI_str_endswith(const char *__restrict str, const char *__restrict end) ATTR_NONNULL(1
char * BLI_strdupcat(const char *__restrict str1, const char *__restrict str2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
size_t BLI_str_format_int64_grouped(char dst[BLI_STR_FORMAT_INT64_GROUPED_SIZE], int64_t num) ATTR_NONNULL(1)
int bool bool bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, size_t str_len) ATTR_NONNULL(1
bool BLI_string_has_word_prefix(const char *haystack, const char *needle, size_t needle_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC 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)
size_t size_t const char * BLI_str_escape_find_quote(const char *str) ATTR_NONNULL(1)
char BLI_toupper_ascii(const char c) ATTR_WARN_UNUSED_RESULT
int char * BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
size_t BLI_snprintf_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) 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
int BLI_str_index_in_array(const char *__restrict str, const char **__restrict str_array) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char char * BLI_strncpy_ensure_pad(char *__restrict dst, const char *__restrict src, char pad, size_t dst_maxncpy) ATTR_NONNULL(1
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
int char char int int BLI_strncasecmp(const char *s1, const char *s2, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
char char size_t BLI_str_escape(char *__restrict dst, StringRef src, size_t dst_maxncpy) ATTR_NONNULL(1)
int BLI_str_rstrip_float_zero(char *str, char pad) 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 bool bool bool size_t size_t size_t int BLI_string_max_possible_word_count(int str_len) ATTR_WARN_UNUSED_RESULT
int char char int int int int size_t BLI_strnlen(const char *str, size_t maxlen) 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)
ATTR_WARN_UNUSED_RESULT const size_t num
size_t BLI_str_unescape_ex(char *__restrict dst, const char *__restrict src, size_t src_len, size_t dst_maxncpy, bool *r_is_complete) ATTR_NONNULL(1
char BLI_tolower_ascii(const char c) ATTR_WARN_UNUSED_RESULT
void BLI_str_tolower_ascii(char *str, size_t len) ATTR_NONNULL(1)
size_t BLI_str_format_int_grouped(char dst[BLI_STR_FORMAT_INT32_GROUPED_SIZE], int num) ATTR_NONNULL(1)
size_t ATTR_PRINTF_FORMAT(3, 4)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
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
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
void BLI_str_format_integer_unit(char dst[BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE], int number_to_format) ATTR_NONNULL(1)
int bool BLI_str_startswith(const char *__restrict str, const char *__restrict start) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void BLI_str_rstrip(char *str) ATTR_NONNULL(1)
size_t size_t char * BLI_sprintfN_with_buffer(char *fixed_buf, size_t fixed_buf_maxncpy, size_t *result_len, const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
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
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
size_t size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, size_t src_len) 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
char * BLI_strdup_null(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_MALLOC
char char * BLI_vsprintfN(const char *__restrict format, va_list args) ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
bool ATTR_WARN_UNUSED_RESULT
void ATTR_NONNULL(1, 2)
int BLI_str_rstrip_digits(char *str) ATTR_NONNULL()
int BLI_strcaseeq(const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char ATTR_MALLOC
Definition BLI_string.hh:79
int char char * BLI_strncasestr(const char *s, const char *find, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char char size_t char * BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
size_t BLI_str_format_uint64_grouped(char dst[BLI_STR_FORMAT_UINT64_GROUPED_SIZE], uint64_t num) ATTR_NONNULL(1)
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
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)
char * BLI_vsprintfN_with_buffer(char *fixed_buf, size_t fixed_buf_maxncpy, size_t *result_len, const char *__restrict format, va_list args) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1