Blender
V3.3
|
#include <stdio.h>
#include <stdlib.h>
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BLI_string_cursor_utf8.h"
Go to the source code of this file.
Typedefs | |
typedef enum eStrCursorDelimType | eStrCursorDelimType |
Functions | |
static eStrCursorDelimType | cursor_delim_type_unicode (const uint uch) |
static eStrCursorDelimType | cursor_delim_type_utf8 (const char *ch_utf8, const size_t ch_utf8_len, const int pos) |
bool | BLI_str_cursor_step_next_utf8 (const char *str, size_t maxlen, int *pos) |
bool | BLI_str_cursor_step_prev_utf8 (const char *str, size_t UNUSED(maxlen), int *pos) |
void | BLI_str_cursor_step_utf8 (const char *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 bool | cursor_step_prev_utf32 (const char32_t *UNUSED(str), size_t UNUSED(maxlen), int *pos) |
void | BLI_str_cursor_step_utf32 (const char32_t *str, size_t maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step) |
typedef enum eStrCursorDelimType eStrCursorDelimType |
enum eStrCursorDelimType |
Enumerator | |
---|---|
STRCUR_DELIM_NONE | |
STRCUR_DELIM_ALPHANUMERIC | |
STRCUR_DELIM_PUNCT | |
STRCUR_DELIM_BRACE | |
STRCUR_DELIM_OPERATOR | |
STRCUR_DELIM_QUOTE | |
STRCUR_DELIM_WHITESPACE | |
STRCUR_DELIM_OTHER |
Definition at line 20 of file string_cursor_utf8.c.
bool BLI_str_cursor_step_next_utf8 | ( | const char * | str, |
size_t | maxlen, | ||
int * | pos | ||
) |
Definition at line 99 of file string_cursor_utf8.c.
References BLI_str_find_next_char_utf8(), pos, and str.
Referenced by BLI_str_cursor_step_utf8().
bool BLI_str_cursor_step_prev_utf8 | ( | const char * | str, |
size_t | UNUSEDmaxlen, | ||
int * | pos | ||
) |
Definition at line 115 of file string_cursor_utf8.c.
References BLI_str_find_prev_char_utf8(), pos, and str.
Referenced by BLI_str_cursor_step_utf8().
void BLI_str_cursor_step_utf32 | ( | const char32_t * | str, |
size_t | maxlen, | ||
int * | pos, | ||
eStrCursorJumpDirection | direction, | ||
eStrCursorJumpType | jump, | ||
bool | use_init_step | ||
) |
Definition at line 228 of file string_cursor_utf8.c.
References BLI_assert, BLI_assert_unreachable, cursor_delim_type_unicode(), cursor_step_next_utf32(), cursor_step_prev_utf32(), jump(), pos, str, STRCUR_DELIM_NONE, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, STRCUR_JUMP_ALL, STRCUR_JUMP_DELIM, and STRCUR_JUMP_NONE.
Referenced by delete_exec(), and move_cursor().
void BLI_str_cursor_step_utf8 | ( | const char * | str, |
size_t | maxlen, | ||
int * | pos, | ||
eStrCursorJumpDirection | direction, | ||
eStrCursorJumpType | jump, | ||
bool | use_init_step | ||
) |
Definition at line 127 of file string_cursor_utf8.c.
References BLI_assert, BLI_assert_unreachable, BLI_str_cursor_step_next_utf8(), BLI_str_cursor_step_prev_utf8(), cursor_delim_type_utf8(), jump(), pos, str, STRCUR_DELIM_NONE, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, STRCUR_JUMP_ALL, STRCUR_JUMP_DELIM, and STRCUR_JUMP_NONE.
Referenced by console_delete_exec(), console_move_exec(), console_selectword_invoke(), handleNumInput(), txt_jump_left(), txt_jump_right(), ui_textedit_delete(), and ui_textedit_move().
|
static |
Definition at line 31 of file string_cursor_utf8.c.
References STRCUR_DELIM_ALPHANUMERIC, STRCUR_DELIM_BRACE, STRCUR_DELIM_OPERATOR, STRCUR_DELIM_OTHER, STRCUR_DELIM_PUNCT, STRCUR_DELIM_QUOTE, and STRCUR_DELIM_WHITESPACE.
Referenced by BLI_str_cursor_step_utf32(), and cursor_delim_type_utf8().
|
static |
Definition at line 88 of file string_cursor_utf8.c.
References BLI_str_utf8_as_unicode_step_or_error(), cursor_delim_type_unicode(), and pos.
Referenced by BLI_str_cursor_step_utf8().
|
static |
Definition at line 210 of file string_cursor_utf8.c.
References pos.
Referenced by BLI_str_cursor_step_utf32().
|
static |
Definition at line 219 of file string_cursor_utf8.c.
References pos.
Referenced by BLI_str_cursor_step_utf32().