summaryrefslogtreecommitdiff
path: root/doc/it/weechat_plugin_api.it.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/it/weechat_plugin_api.it.asciidoc')
-rw-r--r--doc/it/weechat_plugin_api.it.asciidoc13
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc
index bf719f606..af24643fd 100644
--- a/doc/it/weechat_plugin_api.it.asciidoc
+++ b/doc/it/weechat_plugin_api.it.asciidoc
@@ -1515,7 +1515,7 @@ Esempi:
----
char **argv;
int argc;
-argv = weechat_string_split ("abc de fghi", " ", 0, 0, &argc);
+argv = weechat_string_split ("abc de fghi ", " ", 0, 0, &argc);
/* result: argv[0] == "abc"
argv[1] == "de"
argv[2] == "fghi"
@@ -1524,7 +1524,7 @@ argv = weechat_string_split ("abc de fghi", " ", 0, 0, &argc);
*/
weechat_string_free_split (argv);
-argv = weechat_string_split ("abc de fghi", " ", 1, 0, &argc);
+argv = weechat_string_split ("abc de fghi ", " ", 1, 0, &argc);
/* result: argv[0] == "abc de fghi"
argv[1] == "de fghi"
argv[2] == "fghi"
@@ -1532,6 +1532,15 @@ argv = weechat_string_split ("abc de fghi", " ", 1, 0, &argc);
argc == 3
*/
weechat_string_free_split (argv);
+
+argv = weechat_string_split ("abc de fghi ", " ", 2, 0, &argc);
+/* result: argv[0] == "abc de fghi "
+ argv[1] == "de fghi "
+ argv[2] == "fghi "
+ argv[3] == NULL
+ argc == 3
+*/
+weechat_string_free_split (argv);
----
[NOTE]