From 71ae8f1907592a25d8fa6b10e02020f19c16b215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 3 Dec 2022 16:56:01 +0100 Subject: api: add function utf8_strncpy --- doc/it/weechat_plugin_api.it.adoc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'doc/it') diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 0e850188a..088b728c0 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -3938,6 +3938,40 @@ free (string); [NOTE] Questa funzione non è disponibile nelle API per lo scripting. +==== utf8_strncpy + +_WeeChat ≥ 3.8._ + +// TRANSLATION MISSING +Copy _length_ chars max in another string and add null byte at the end. + +Prototipo: + +[source,c] +---- +void weechat_utf8_strncpy (char *dest, const char *string, int length); +---- + +Argomenti: + +// TRANSLATION MISSING +* _dest_: destination string (must be long enough) +* _string_: stringa +// TRANSLATION MISSING +* _length_: max chars to copy + +Esempio in C: + +[source,c] +---- +char dest[256]; + +weechat_utf8_strncpy (dest, "chêne", 3); /* copies "chê" to dest */ +---- + +[NOTE] +Questa funzione non è disponibile nelle API per lo scripting. + // TRANSLATION MISSING [[crypto]] === Cryptography -- cgit v1.2.3