summaryrefslogtreecommitdiff
path: root/doc/en/weechat_plugin_api.en.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/en/weechat_plugin_api.en.txt')
-rw-r--r--doc/en/weechat_plugin_api.en.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index 9d3d8ebc5..6db28bd8c 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -995,6 +995,56 @@ free (str);
[NOTE]
This function is not available in scripting API.
+==== weechat_string_convert_escaped_chars
+
+_WeeChat ≥ 0.4.4._
+
+Convert escaped chars to their value:
+
+* `\"`: double quote
+* `\\`: backslash
+* `\a`: alert (BEL)
+* `\b`: backspace
+* `\e`: escape
+* `\f`: form feed
+* `\n`: new line
+* `\r`: carriage return
+* `\t`: horizontal tab
+* `\v`: vertical tab
+* `\0ooo`: char as octal value (ooo is 0 to 3 digits)
+* `\xhh`: char as hexadecimal value (hh is 1 to 2 digits)
+* `\uhhhh`: unicode char as hexadecimal value (hhhh is 1 to 4 digits)
+* `\Uhhhhhhhh`: unicode char as hexadecimal value (hhhhhhhh is 1 to 8 digits)
+
+Prototype:
+
+[source,C]
+----
+char *weechat_string_convert_escaped_chars (const char *string);
+----
+
+Arguments:
+
+* 'string': string
+
+Return value:
+
+* string with escaped chars replaced by their value (must be freed by calling
+ "free" after use)
+
+C example:
+
+[source,C]
+----
+char *str = weechat_string_convert_escaped_chars ("snowman: \\u2603");
+/* str == "snowman: ☃" */
+/* ... */
+free (str);
+----
+
+[NOTE]
+This function is not available in scripting API.
+
==== weechat_string_mask_to_regex
Return a regex, built with a mask, where only special char is "`*`". All other