mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 23:52:22 +02:00
Introduce string_chars_for_width().
This commit is contained in:
parent
35b3ccc6a4
commit
719efc44a3
2 changed files with 50 additions and 0 deletions
|
|
@ -42,6 +42,12 @@ int string_length(const char *str, int policy);
|
|||
*/
|
||||
int string_width(const char *str, int policy);
|
||||
|
||||
/* Return the amount of characters from str it takes to reach n columns, or -1 if
|
||||
* str is NULL. Optionally return the equivalent amount of bytes.
|
||||
* If policy is -1, this function will call string_policy().
|
||||
*/
|
||||
int string_chars_for_width(const char *str, int policy, unsigned int n, unsigned int *bytes);
|
||||
|
||||
#define unichar_isprint(c) (((c) & ~0x80) >= 32)
|
||||
#define is_utf8_leading(c) (((c) & 0xc0) != 0x80)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue