summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/en/weechat_plugin_api.en.asciidoc13
-rw-r--r--doc/fr/weechat_plugin_api.fr.asciidoc13
-rw-r--r--doc/it/weechat_plugin_api.it.asciidoc13
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc13
4 files changed, 44 insertions, 8 deletions
diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc
index ffc2130ef..c4a87d81a 100644
--- a/doc/en/weechat_plugin_api.en.asciidoc
+++ b/doc/en/weechat_plugin_api.en.asciidoc
@@ -1452,7 +1452,7 @@ C example:
----
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"
@@ -1461,7 +1461,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"
@@ -1469,6 +1469,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]
diff --git a/doc/fr/weechat_plugin_api.fr.asciidoc b/doc/fr/weechat_plugin_api.fr.asciidoc
index c26284236..2898dbc2e 100644
--- a/doc/fr/weechat_plugin_api.fr.asciidoc
+++ b/doc/fr/weechat_plugin_api.fr.asciidoc
@@ -1480,7 +1480,7 @@ Exemples en C :
----
char **argv;
int argc;
-argv = weechat_string_split ("abc de fghi", " ", 0, 0, &argc);
+argv = weechat_string_split ("abc de fghi ", " ", 0, 0, &argc);
/* résultat : argv[0] == "abc"
argv[1] == "de"
argv[2] == "fghi"
@@ -1489,7 +1489,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);
/* résultat : argv[0] == "abc de fghi"
argv[1] == "de fghi"
argv[2] == "fghi"
@@ -1497,6 +1497,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);
+/* résultat : argv[0] == "abc de fghi "
+ argv[1] == "de fghi "
+ argv[2] == "fghi "
+ argv[3] == NULL
+ argc == 3
+*/
+weechat_string_free_split (argv);
----
[NOTE]
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]
diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc
index b408c9cef..e82504c90 100644
--- a/doc/ja/weechat_plugin_api.ja.asciidoc
+++ b/doc/ja/weechat_plugin_api.ja.asciidoc
@@ -1454,7 +1454,7 @@ C 言語での使用例:
----
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"
@@ -1463,7 +1463,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"
@@ -1471,6 +1471,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]