diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-07-04 13:21:16 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-07-04 13:27:33 +0200 |
commit | 5b87e0c54448d035cce8fb7ea29034e2e8f7ee47 (patch) | |
tree | d6af8ed16fecb3c71bb3823bd1aac37a2424200d /src/plugins/weechat-plugin.h | |
parent | 1746e832eca027208b216cfa85b4ef046dd79112 (diff) | |
download | weechat-5b87e0c54448d035cce8fb7ea29034e2e8f7ee47.zip |
api: add function string_cut
Diffstat (limited to 'src/plugins/weechat-plugin.h')
-rw-r--r-- | src/plugins/weechat-plugin.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index b509e952e..5802f2646 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -68,7 +68,7 @@ struct timeval; * please change the date with current one; for a second change at same * date, increment the 01, otherwise please keep 01. */ -#define WEECHAT_PLUGIN_API_VERSION "20210703-01" +#define WEECHAT_PLUGIN_API_VERSION "20210704-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -285,6 +285,8 @@ struct t_weechat_plugin const char *(*gettext) (const char *string); const char *(*ngettext) (const char *single, const char *plural, int count); char *(*strndup) (const char *string, int length); + char *(*string_cut) (const char *string, int length, int count_suffix, + int screen, const char *cut_suffix); void (*string_tolower) (char *string); void (*string_toupper) (char *string); int (*strcasecmp) (const char *string1, const char *string2); @@ -1192,6 +1194,10 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); (weechat_plugin->ngettext)(single, plural, number) #define weechat_strndup(__string, __length) \ (weechat_plugin->strndup)(__string, __length) +#define weechat_string_cut(__string, __length, __count_suffix, \ + __screen, __cut_suffix) \ + (weechat_plugin->string_cut)(__string, __length, __count_suffix, \ + __screen, __cut_suffix) #define weechat_string_tolower(__string) \ (weechat_plugin->string_tolower)(__string) #define weechat_string_toupper(__string) \ |