From 46a9d17ac331b1df9fbd33a7c23f87fd58246a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 18 Aug 2015 07:36:48 +0200 Subject: api: add argument "length" in function utf8_is_valid() --- doc/ja/weechat_plugin_api.ja.asciidoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'doc/ja') diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc index 5aad67915..f7f17fb9c 100644 --- a/doc/ja/weechat_plugin_api.ja.asciidoc +++ b/doc/ja/weechat_plugin_api.ja.asciidoc @@ -2152,18 +2152,23 @@ if (weechat_utf8_has_8bits (string)) ==== utf8_is_valid +_バージョン 1.4 で更新。_ + 文字列が妥当な UTF-8 表現か確認。 プロトタイプ: [source,C] ---- -int weechat_utf8_is_valid (const char *string, char **error); +int weechat_utf8_is_valid (const char *string, int length, char **error); ---- 引数: * 'string': 文字列 +// TRANSLATION MISSING +* 'length': max number of UTF-8 chars to check; if ≤ 0, the whole string is + checked _(WeeChat ≥ 1.4)_ * 'error': NULL でない場合は '*error*' は文字列に含まれる最初の妥当でない UTF-8 文字へのポインタ @@ -2176,7 +2181,7 @@ C 言語での使用例: [source,C] ---- char *error; -if (weechat_utf8_is_valid (string, &error)) +if (weechat_utf8_is_valid (string, -1, &error)) { /* ... */ } -- cgit v1.2.3