From b6d0daa9cb261b3ce2ba3053ebee86f79caa5f06 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Oct 2011 12:25:42 +0000 Subject: 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. --- source/blender/blenlib/BLI_string.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenlib/BLI_string.h') 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 } -- cgit v1.2.3