1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

api: add argument "strip_items" in function string_split

This commit is contained in:
Sébastien Helleu
2019-06-15 20:47:14 +02:00
parent 866a29c7e6
commit 9178156354
78 changed files with 473 additions and 195 deletions
+6 -2
View File
@@ -736,6 +736,7 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
tags = weechat_string_split (
pos2,
",",
NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -824,11 +825,14 @@ trigger_callback_line_cb (const void *pointer, void *data,
weechat_hashtable_set (pointers, "buffer", buffer);
ptr_value = weechat_hashtable_get (line, "tags");
tags = weechat_string_split ((ptr_value) ? ptr_value : "", ",",
tags = weechat_string_split ((ptr_value) ? ptr_value : "",
",",
NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_tags);
0,
&num_tags);
/* build string with tags and commas around: ",tag1,tag2,tag3," */
length = 1 + strlen ((ptr_value) ? ptr_value : "") + 1 + 1;