summaryrefslogtreecommitdiff
path: root/doc/ja/weechat_plugin_api.ja.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ja/weechat_plugin_api.ja.adoc')
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 7511c36de..0a1b8516b 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -1981,6 +1981,52 @@ def string_format_size(size: int) -> str: ...
str = weechat.string_format_size(15200) # == "15.2 KB"
----
+// TRANSLATION MISSING
+==== string_parse_size
+
+_WeeChat ≥ 3.7._
+
+Parse a string with a size and optional unit and return the size in bytes.
+
+プロトタイプ:
+
+[source,c]
+----
+unsigned long long weechat_string_parse_size (const char *size);
+----
+
+引数:
+
+* _size_: the size as string: float number followed optional spaces and optional
+ unit (lower or upper case), which is one of:
+** _b_: bytes
+** _k_: kilobytes (1k = 1000 bytes)
+** _m_: megabytes (1m = 1000k = 1,000,000 bytes)
+** _g_: gigabytes (1g = 1000m = 1,000,000,000 bytes)
+** _t_: terabytes (1t = 1000g = 1,000,000,000,000 bytes)
+
+戻り値:
+
+* size in bytes, 0 if error
+
+C 言語での使用例:
+
+[source,c]
+----
+unsigned long long size = weechat_parse_size ("1.34m"); /* size == 1340000 */
+----
+
+Script (Python):
+
+[source,python]
+----
+# プロトタイプ
+def string_parse_size(size: str) -> int: ...
+
+# 例
+size = weechat.string_parse_size("1.34m") # 1340000
+----
+
==== string_color_code_size
_WeeChat ≥ 3.0._