129 const int ch_utf8_len,
135 size_t index = size_t(pos);
146 if (*pos >= str_maxlen) {
149 const char *str_end =
str + (str_maxlen + 1);
150 const char *str_pos =
str + *pos;
151 const char *str_next = str_pos;
154 }
while ((str_next < str_end) && (str_next[0] != 0) &&
156 *pos += int(str_next - str_pos);
157 *pos = std::min(*pos, str_maxlen);
168 if ((*pos > 0) && (*pos <= str_maxlen)) {
169 const char *str_pos =
str + *pos;
170 const char *str_prev = str_pos;
174 *pos -= int(str_pos - str_prev);
182 const int str_maxlen,
189 const int pos_orig = *pos;
206 while (*pos < str_maxlen) {
208 if (*pos == str_maxlen) {
233 str, str_maxlen, *pos - 1) :
239 const int pos_prev = *pos;
245 if ((pos_orig - *pos) >= 1) {
268 if (*pos >= str_maxlen) {
296 const int str_maxlen,
303 const int pos_orig = *pos;
320 while (*pos < str_maxlen) {
350 const int pos_prev = *pos;
356 if ((pos_orig - *pos) >= 1) {
374 const char *
str,
const int str_maxlen,
const int pos,
int *r_start,
int *r_end)
403 const char32_t *
str,
const int str_maxlen,
const int pos,
int *r_start,
int *r_end)
#define BLI_assert_unreachable()
#define UNUSED_VARS_NDEBUG(...)
void jump(const btVector3 &v=btVector3(0, 0, 0))
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
@ STRCUR_DELIM_WHITESPACE
@ STRCUR_DELIM_ALPHANUMERIC
bool BLI_str_cursor_step_next_utf8(const char *str, int str_maxlen, int *pos)
static eStrCursorDelimType cursor_delim_type_utf8(const char *ch_utf8, const int ch_utf8_len, const int pos)
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
int BLI_str_utf8_char_width_or_error(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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
bool BLI_str_cursor_step_prev_utf8(const char *str, int str_maxlen, int *pos)
void BLI_str_cursor_step_utf32(const char32_t *str, int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
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
void BLI_str_cursor_step_utf8(const char *str, int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
bool BLI_str_cursor_step_next_utf32(const char32_t *str, int str_maxlen, int *pos)
static eStrCursorDelimType cursor_delim_type_unicode(const uint uch)
bool BLI_str_cursor_step_prev_utf32(const char32_t *str, int str_maxlen, int *pos)
void BLI_str_cursor_step_bounds_utf32(const char32_t *str, int str_maxlen, int pos, int *r_start, int *r_end)
size_t size_t int BLI_wcwidth_or_error(char32_t ucs) ATTR_WARN_UNUSED_RESULT
void BLI_str_cursor_step_bounds_utf8(const char *str, int str_maxlen, int pos, int *r_start, int *r_end)