17 # pragma GCC diagnostic error "-Wsign-conversion"
89 const size_t ch_utf8_len,
94 size_t index = (size_t)
pos;
101 const char *str_end =
str + (maxlen + 1);
102 const char *str_pos =
str + (*pos);
104 if (str_next != str_end) {
105 (*pos) += (str_next - str_pos);
106 if ((*
pos) > (int)maxlen) {
107 (*pos) = (int)maxlen;
118 const char *str_pos =
str + (*pos);
120 (*pos) -= (str_pos - str_prev);
134 const int pos_orig = *
pos;
151 while ((*
pos) < maxlen) {
153 if (*
pos == maxlen) {
183 const int pos_prev = *
pos;
188 if ((pos_orig - (*
pos)) >= 1) {
212 if ((*
pos) >= (
int)maxlen) {
235 const int pos_orig = *
pos;
252 while ((*
pos) < maxlen) {
281 const int pos_prev = *
pos;
286 if ((pos_orig - (*
pos)) >= 1) {
#define BLI_assert_unreachable()
const char const char * BLI_str_find_next_char_utf8(const char *p, const char *str_end) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1
const char * BLI_str_find_prev_char_utf8(const char *p, const char *str_start) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1
unsigned int unsigned int BLI_str_utf8_as_unicode_step_or_error(const char *__restrict p, size_t p_len, size_t *__restrict index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void jump(const btVector3 &v=btVector3(0, 0, 0))
void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
static eStrCursorDelimType cursor_delim_type_unicode(const uint uch)
static bool cursor_step_prev_utf32(const char32_t *UNUSED(str), size_t UNUSED(maxlen), int *pos)
bool BLI_str_cursor_step_next_utf8(const char *str, size_t maxlen, int *pos)
@ STRCUR_DELIM_WHITESPACE
@ STRCUR_DELIM_ALPHANUMERIC
void BLI_str_cursor_step_utf32(const char32_t *str, size_t maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
static bool cursor_step_next_utf32(const char32_t *UNUSED(str), size_t maxlen, int *pos)
static eStrCursorDelimType cursor_delim_type_utf8(const char *ch_utf8, const size_t ch_utf8_len, const int pos)
bool BLI_str_cursor_step_prev_utf8(const char *str, size_t UNUSED(maxlen), int *pos)