diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-24 18:29:35 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-24 18:29:35 +0100 |
commit | 21f35750163cd64cf323f5070aa9ae158c943b33 (patch) | |
tree | e2da35530697689006219061c1b9c3a45b449a35 /doc/fr | |
parent | 0dd1d4133b1e49646ec4fc7cfb256dc20028f238 (diff) | |
download | weechat-21f35750163cd64cf323f5070aa9ae158c943b33.zip |
api: add functions string_strcmp and string_strncmp
Diffstat (limited to 'doc/fr')
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index fbe5ebdf7..44fb3d81d 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -782,6 +782,77 @@ int diff = weechat_string_charcasecmp ("aaa", "CCC"); /* == -2 */ [NOTE] Cette fonction n'est pas disponible dans l'API script. +==== strcmp + +_WeeChat ≥ 3.8._ + +Comparer deux chaînes. + +Prototype : + +[source,c] +---- +int weechat_strcmp (const char *string1, const char *string2); +---- + +Paramètres : + +* _string1_ : première chaîne à comparer +* _string2_ : seconde chaîne à comparer + +Valeur de retour : résultat de la soustraction du dernier caractère UTF-8 comparé +dans _string2_ du dernier caractère UTF-8 comparé dans _string1_ : + +* < 0 si string1 < string2 +* 0 si string1 == string2 +* > 0 si string1 > string2 + +Exemple en C : + +[source,c] +---- +int diff = weechat_strcmp ("aaa", "ccc"); /* == -2 */ +---- + +[NOTE] +Cette fonction n'est pas disponible dans l'API script. + +==== strncmp + +_WeeChat ≥ 3.8._ + +Comparer deux chaînes, pour _max_ caractères. + +Prototype : + +[source,c] +---- +int weechat_strncmp (const char *string1, const char *string2, int max); +---- + +Paramètres : + +* _string1_ : première chaîne à comparer +* _string2_ : seconde chaîne à comparer +* _max_ : nombre maximum de caractères à comparer + +Valeur de retour : résultat de la soustraction du dernier caractère UTF-8 comparé +dans _string2_ du dernier caractère UTF-8 comparé dans _string1_ : + +* < 0 si string1 < string2 +* 0 si string1 == string2 +* > 0 si string1 > string2 + +Exemple en C : + +[source,c] +---- +int diff = weechat_strncmp ("aabb", "aacc", 2); /* == 0 */ +---- + +[NOTE] +Cette fonction n'est pas disponible dans l'API script. + ==== strcasecmp _Mis à jour dans la 1.0, 3.8._ |