127 const int ch_utf8_len,
133 size_t index = size_t(
pos);
144 if (*
pos >= str_maxlen) {
147 const char *str_end =
str + (str_maxlen + 1);
148 const char *str_pos =
str + *
pos;
149 const char *str_next = str_pos;
152 }
while ((str_next < str_end) && (str_next[0] != 0) &&
154 *
pos += int(str_next - str_pos);
155 *
pos = std::min(*
pos, str_maxlen);
166 if ((*
pos > 0) && (*
pos <= str_maxlen)) {
167 const char *str_pos =
str + *
pos;
168 const char *str_prev = str_pos;
172 *
pos -= int(str_pos - str_prev);
180 const int str_maxlen,
187 const int pos_orig = *
pos;
204 while (*
pos < str_maxlen) {
206 if (*
pos == str_maxlen) {
231 str, str_maxlen, *
pos - 1) :
237 const int pos_prev = *
pos;
243 if ((pos_orig - *
pos) >= 1) {
266 if (*
pos >= str_maxlen) {
294 const int str_maxlen,
301 const int pos_orig = *
pos;
318 while (*
pos < str_maxlen) {
348 const int pos_prev = *
pos;
354 if ((pos_orig - *
pos) >= 1) {
372 const char *
str,
const int str_maxlen,
const int pos,
int *r_start,
int *r_end)
401 const char32_t *
str,
const int str_maxlen,
const int pos,
int *r_start,
int *r_end)
#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
int BLI_str_utf8_char_width_or_error(const char *p) ATTR_WARN_UNUSED_RESULT 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
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
size_t size_t int BLI_wcwidth_or_error(char32_t ucs) ATTR_WARN_UNUSED_RESULT
#define UNUSED_VARS_NDEBUG(...)
void jump(const btVector3 &v=btVector3(0, 0, 0))
void BLI_str_cursor_step_utf32(const char32_t *str, const int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
static eStrCursorDelimType cursor_delim_type_unicode(const uint uch)
void BLI_str_cursor_step_bounds_utf32(const char32_t *str, const int str_maxlen, const int pos, int *r_start, int *r_end)
bool BLI_str_cursor_step_next_utf8(const char *str, const int str_maxlen, int *pos)
@ STRCUR_DELIM_WHITESPACE
@ STRCUR_DELIM_ALPHANUMERIC
static eStrCursorDelimType cursor_delim_type_utf8(const char *ch_utf8, const int ch_utf8_len, const int pos)
void BLI_str_cursor_step_utf8(const char *str, const int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
bool BLI_str_cursor_step_prev_utf32(const char32_t *str, const int str_maxlen, int *pos)
void BLI_str_cursor_step_bounds_utf8(const char *str, const int str_maxlen, const int pos, int *r_start, int *r_end)
bool BLI_str_cursor_step_next_utf32(const char32_t *str, const int str_maxlen, int *pos)
bool BLI_str_cursor_step_prev_utf8(const char *str, const int str_maxlen, int *pos)