summaryrefslogtreecommitdiff
path: root/doc/ja
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-06-24 07:54:42 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-06-24 07:54:42 +0200
commit2bd2d74a0720f02d9e5587331659c4d1bbd4e97f (patch)
treec3c448fbfa5b7dd235c76eb7b235a5fc06ef2dbb /doc/ja
parent6668b9869bd8c02196e51776d44465ccfce4a9bc (diff)
downloadweechat-2bd2d74a0720f02d9e5587331659c4d1bbd4e97f.zip
api: add function string_eval_path_home()
Diffstat (limited to 'doc/ja')
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc61
-rw-r--r--doc/ja/weechat_scripting.ja.asciidoc2
2 files changed, 62 insertions, 1 deletions
diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc
index bbcf50784..0cbb3c139 100644
--- a/doc/ja/weechat_plugin_api.ja.asciidoc
+++ b/doc/ja/weechat_plugin_api.ja.asciidoc
@@ -921,6 +921,67 @@ free (str);
[NOTE]
スクリプト API ではこの関数を利用できません。
+==== string_eval_path_home
+
+_WeeChat バージョン 0.3.3 以上で利用可。_
+
+// TRANSLATION MISSING
+Evaluate a path in 3 steps:
+
+. replace leading `%h` by WeeChat home directory,
+. replace leading `~` by user home directory (call to
+ <<_string_expand_home,weechat_string_expand_home>>),
+. evaluate variables
+ (see <<_string_eval_expression,weechat_string_eval_expression>>).
+
+プロトタイプ:
+
+[source,C]
+----
+char *weechat_string_eval_path_home (const char *path,
+ struct t_hashtable *pointers,
+ struct t_hashtable *extra_vars,
+ struct t_hashtable *options);
+----
+
+// TRANSLATION MISSING
+引数:
+
+* 'path': path
+* 'pointers': hashtable for call to function
+ <<_string_eval_expression,weechat_string_eval_expression>>
+* 'extra_vars': hashtable for call to function
+ <<_string_eval_expression,weechat_string_eval_expression>>
+* 'options': hashtable for call to function
+ <<_string_eval_expression,weechat_string_eval_expression>>
+
+// TRANSLATION MISSING
+戻り値:
+
+* evaluated path (must be freed by calling "free" after use)
+
+C 言語での使用例:
+
+[source,C]
+----
+char *str = weechat_string_expand_home ("%h/test/file.txt");
+/* result: "/home/xxx/.weechat/test/file.txt" */
+/* ... */
+free (str);
+----
+
+スクリプト (Python) での使用例:
+
+[source,python]
+----
+# プロトタイプ
+path = weechat.string_eval_path_home(path, pointers, extra_vars, options)
+
+# 例
+path = weechat.string_eval_path_home("%h/test/file.txt", "", "", "")
+# path == "/home/xxx/.weechat/test/file.txt"
+----
+
==== string_remove_quotes
文字列の最初と最後から引用符号を削除
diff --git a/doc/ja/weechat_scripting.ja.asciidoc b/doc/ja/weechat_scripting.ja.asciidoc
index eec45a64e..9db3410ac 100644
--- a/doc/ja/weechat_scripting.ja.asciidoc
+++ b/doc/ja/weechat_scripting.ja.asciidoc
@@ -396,7 +396,7 @@ API に含まれる関数の詳しい情報は
charset_set, iconv_to_internal, iconv_from_internal, gettext, ngettext, +
strlen_screen, string_match, string_has_highlight, string_has_highlight_regex,
string_mask_to_regex, string_remove_color, string_is_command_char,
- string_input_for_buffer, string_eval_expression
+ string_input_for_buffer, string_eval_expression, string_eval_path_home
| ディレクトリ操作 |
mkdir_home, mkdir, mkdir_parents
| ソート済みリスト |