summaryrefslogtreecommitdiff
path: root/doc/ja/weechat_plugin_api.ja.asciidoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2016-01-24 08:03:55 +0100
committerSébastien Helleu <flashcode@flashtux.org>2016-01-24 08:03:55 +0100
commitcd23a5fa925d857bc8624a4c2fa12a0b5829de98 (patch)
treecb276f92d3dca26b05d6d4ddb22ca8ae84ca305c /doc/ja/weechat_plugin_api.ja.asciidoc
parent1a94193147337b4c540febe258b777b635d34bc6 (diff)
downloadweechat-cd23a5fa925d857bc8624a4c2fa12a0b5829de98.zip
doc: add an example in function string_split (plugin API reference)
Diffstat (limited to 'doc/ja/weechat_plugin_api.ja.asciidoc')
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc13
1 files changed, 11 insertions, 2 deletions
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]