diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2016-01-24 08:03:55 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2016-01-24 08:03:55 +0100 |
commit | cd23a5fa925d857bc8624a4c2fa12a0b5829de98 (patch) | |
tree | cb276f92d3dca26b05d6d4ddb22ca8ae84ca305c /doc/ja/weechat_plugin_api.ja.asciidoc | |
parent | 1a94193147337b4c540febe258b777b635d34bc6 (diff) | |
download | weechat-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.asciidoc | 13 |
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] |