1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 00:33:13 +02:00

core: add a way to count the suffix length in max chars displayed in cut of string ("cut:" and "cutscr:") (closes #963)

The format to use is one of:

- ${cut:+max,suffix,string}
- ${cutscr:+max,suffix,string}

With the "+" before max, WeeChat ensures there are at most "max" chars in
output, including the length of suffix string.
This commit is contained in:
Sébastien Helleu
2017-04-24 22:37:49 +02:00
parent 0470a71af9
commit 112bebcddf
28 changed files with 331 additions and 195 deletions
+2 -2
View File
@@ -36,8 +36,8 @@ struct t_string_dyn
struct t_hashtable;
extern char *string_strndup (const char *string, int length);
extern char *string_cut (const char *string, int length, int screen,
const char *cut_suffix);
extern char *string_cut (const char *string, int length, int count_suffix,
int screen, const char *cut_suffix);
extern void string_tolower (char *string);
extern void string_toupper (char *string);
extern int string_strcasecmp (const char *string1, const char *string2);