Add function get_utf8_chars_for_width().

This commit is contained in:
Xavier G 2016-04-22 23:09:56 +02:00
commit 2b92e43d37
2 changed files with 48 additions and 0 deletions

View file

@ -14,6 +14,7 @@ int mk_wcwidth(unichar c);
/* Return the number of columns occupied by a given string. */
int get_utf8_char_width(const gchar *);
int get_utf8_string_width(const gchar *);
int get_utf8_chars_for_width(const gchar *, unsigned int, int, unsigned int *);
#define unichar_isprint(c) (((c) & ~0x80) >= 32)
#define is_utf8_leading(c) (((c) & 0xc0) != 0x80)