diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-16 16:25:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-16 16:25:42 +0400 |
commit | b6d0daa9cb261b3ce2ba3053ebee86f79caa5f06 (patch) | |
tree | 5bb3ca333d1baae537e91f4ef93bee803e486f5d /source/blender/blenlib/BLI_string.h | |
parent | 92bc72dca19ae50a8e1a36734a7280e10f8e352e (diff) |
utf8 editing for UI text input, this means backspace, delete, arrow keys properly move the cursor with multi-byte chars.
Note that this is only for the interface, text editor and python console still miss this feature.
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r-- | source/blender/blenlib/BLI_string.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index c53ce9dced5..3ac8dba106a 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -147,6 +147,10 @@ void BLI_ascii_strtoupper(char *str, int len); char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy); int BLI_utf8_invalid_byte(const char *str, int length); int BLI_utf8_invalid_strip(char *str, int length); + /* copied from glib */ +char *BLI_str_find_prev_char_utf8(const char *str, const char *p); +char *BLI_str_find_next_char_utf8(const char *p, const char *end); +char *BLI_str_prev_char_utf8(const char *p); #ifdef __cplusplus } |