summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-12-21 19:23:29 +0100
committerSébastien Helleu <flashcode@flashtux.org>2022-12-21 20:49:09 +0100
commit68b510517e7a14b2d2457f8437e9291b87e0d1d5 (patch)
treea3fae5b8673ec860f49315bb1b0ec72e74cf54d1 /doc
parent95286c1eb362cedb767597ea23fb29d6455f6b94 (diff)
downloadweechat-68b510517e7a14b2d2457f8437e9291b87e0d1d5.zip
core: improve case convert and insensitive char comparisons (closes #258)
All lowercase letters are now properly converted to uppercase letters (and vice versa), via functions `towupper` and `towlower`. Functions `string_tolower`, `string_toupper` and `utf8_charcasecmp` have been optimized to be faster when there are ASCII chars (< 128); functions are about 25-40% faster with mixed chars (both ASCII and multi-bytes). Function `utf8_wide_char` has been removed, `utf8_char_int` can be used instead.
Diffstat (limited to 'doc')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc86
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc94
-rw-r--r--doc/it/weechat_plugin_api.it.adoc100
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc98
-rw-r--r--doc/sr/weechat_plugin_api.sr.adoc94
5 files changed, 364 insertions, 108 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index e8619b081..991d0d997 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -618,9 +618,13 @@ This function is not available in scripting API.
_Updated in 3.8._
-Return a string with uppercase letters converted to lowercase. +
-This function is locale independent: only letters `A` to `Z` without accents
-are converted to lowercase. All other chars are kept as-is.
+Return a string with uppercase letters converted to lowercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
Prototype:
@@ -641,7 +645,7 @@ C example:
[source,c]
----
-char *str = weechat_string_tolower ("ABCD_É"); /* result: "abcd_É" */
+char *str = weechat_string_tolower ("ABCD_É"); /* result: "abcd_é" */
/* ... */
free (str);
----
@@ -653,9 +657,13 @@ This function is not available in scripting API.
_Updated in 3.8._
-Return a string with lowercase letters converted to uppercase. +
-This function is locale independent: only letters `a` to `z` without accents
-are converted to uppercase. All other chars are kept as-is.
+Return a string with lowercase letters converted to uppercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all lowercase letters are properly
+converted to uppercase (by calling function `towupper`), in addition to the
+range `a` to `z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
Prototype:
@@ -676,7 +684,7 @@ C example:
[source,c]
----
-char *str = weechat_string_toupper ("abcd_é"); /* result: "ABCD_é" */
+char *str = weechat_string_toupper ("abcd_é"); /* result: "ABCD_É" */
/* ... */
free (str);
----
@@ -686,9 +694,14 @@ This function is not available in scripting API.
==== strcasecmp
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
+
+Case insensitive string comparison.
-Locale and case independent string comparison.
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Prototype:
@@ -712,7 +725,9 @@ C example:
[source,c]
----
-int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */
+int diff;
+diff = weechat_strcasecmp ("aaa", "CCC"); /* == -1 */
+diff = weechat_strcasecmp ("noël", "NOËL"); /* == 0 */
----
[NOTE]
@@ -762,9 +777,14 @@ This function is not available in scripting API.
==== strncasecmp
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
+
+Case insensitive string comparison, for _max_ chars.
-Locale and case independent string comparison, for _max_ chars.
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Prototype:
@@ -840,10 +860,9 @@ This function is not available in scripting API.
==== strcmp_ignore_chars
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
-Locale (and optionally case independent) string comparison, ignoring some
-chars.
+String comparison ignoring some chars.
Prototype:
@@ -861,6 +880,11 @@ Arguments:
* _chars_ignored_: string with chars to ignored
* _case_sensitive_: 1 for case sensitive comparison, otherwise 0
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Return value:
* -1 if string1 < string2
@@ -879,9 +903,14 @@ This function is not available in scripting API.
==== strcasestr
-_Updated in 1.3._
+_Updated in 1.3, 3.8._
+
+Case insensitive string search.
-Locale and case independent string search.
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Prototype:
@@ -954,7 +983,7 @@ length = weechat.strlen_screen("é") # 1
==== string_match
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
Check if a string matches a mask.
@@ -977,6 +1006,11 @@ Arguments:
Since version 1.0, wildcards are allowed inside the mask
(not only beginning/end of mask).
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Return value:
* 1 if string matches mask, otherwise 0
@@ -1009,7 +1043,7 @@ match5 = weechat.string_match("abcdef", "*b*d*", 0) # == 1
==== string_match_list
-_WeeChat ≥ 2.5._
+_WeeChat ≥ 2.5, updated in 3.8._
Check if a string matches a list of masks where negative mask is allowed
with the format "!word". A negative mask has higher priority than a standard
@@ -1030,6 +1064,11 @@ Arguments:
is compared to the string with the function <<_string_match,string_match>>
* _case_sensitive_: 1 for case sensitive comparison, otherwise 0
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Return value:
* 1 if string matches list of masks (at least one mask matches and no negative
@@ -3624,10 +3663,15 @@ This function is not available in scripting API.
==== utf8_charcasecmp
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
Compare two UTF-8 chars, ignoring case.
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
+
Prototype:
[source,c]
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index bac367bed..ca52b4977 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -628,10 +628,14 @@ Cette fonction n'est pas disponible dans l'API script.
_Mis à jour dans la 3.8._
-Retourner une chaîne avec les lettres majuscules converties en minuscules. +
-Cette fonction n'est pas dépendante de la locale : seules les lettres `A` à `Z`
-sans accents sont converties en minuscules. Tous les autres caractères sont
-gardés tels quels.
+Retourner une chaîne avec les lettres majuscules converties en minuscules.
+
+[NOTE]
+Le comportement a changé dans la version 3.8 : désormais toutes les lettres en
+majuscules sont correctement converties en minuscules (par appel à la fonction
+`towlower`), en plus de l'intervalle de `A` à `Z`. +
+De plus, une chaîne nouvellement allouée est retournée et doit être libérée après
+utilisation.
Prototype :
@@ -653,7 +657,7 @@ Exemple en C :
[source,c]
----
-char *str = weechat_string_tolower ("ABCD_É"); /* résultat : "abcd_É" */
+char *str = weechat_string_tolower ("ABCD_É"); /* résultat : "abcd_é" */
/* ... */
free (str);
----
@@ -665,10 +669,14 @@ Cette fonction n'est pas disponible dans l'API script.
_Mis à jour dans la 3.8._
-Retourner une chaîne avec les lettres minuscules converties en majuscules. +
-Cette fonction n'est pas dépendante de la locale : seules les lettres `a` à `z`
-sans accents sont converties en majuscules. Tous les autres caractères sont
-gardés tels quels.
+Retourner une chaîne avec les lettres minuscules converties en majuscules.
+
+[NOTE]
+Le comportement a changé dans la version 3.8 : désormais toutes les lettres en
+minuscules sont correctement converties en majuscules (par appel à la fonction
+`towupper`), en plus de l'intervalle de `a` à `z`. +
+De plus, une chaîne nouvellement allouée est retournée et doit être libérée après
+utilisation.
Prototype :
@@ -690,7 +698,7 @@ Exemple en C :
[source,c]
----
-char *str = weechat_string_toupper ("abcd_é"); /* résultat : "ABCD_é" */
+char *str = weechat_string_toupper ("abcd_é"); /* résultat : "ABCD_É" */
/* ... */
free (str);
----
@@ -700,9 +708,14 @@ Cette fonction n'est pas disponible dans l'API script.
==== strcasecmp
-_Mis à jour dans la 1.0._
+_Mis à jour dans la 1.0, 3.8._
+
+Comparer deux chaînes indépendemment de la casse.
-Comparer deux chaînes indépendemment de la locale et de la casse.
+[NOTE]
+Le comportement a changé dans la version 3.8 : désormais toutes les lettres en
+majuscules sont correctement converties en minuscules (par appel à la fonction
+`towlower`), en plus de l'intervalle de `A` à `Z`.
Prototype :
@@ -726,7 +739,9 @@ Exemple en C :
[source,c]
----
-int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */
+int diff;
+diff = weechat_strcasecmp ("aaa", "CCC"); /* == -1 */
+diff = weechat_strcasecmp ("noël", "NOËL"); /* == 0 */
----
[NOTE]
@@ -776,10 +791,14 @@ Cette fonction n'est pas disponible dans l'API script.
==== strncasecmp
-_Mis à jour dans la 1.0._
+_Mis à jour dans la 1.0, 3.8._
-Comparer deux chaînes indépendemment de la locale et de la casse, pour _max_
-caractères.
+Comparer deux chaînes indépendemment de la casse, pour _max_ caractères.
+
+[NOTE]
+Le comportement a changé dans la version 3.8 : désormais toutes les lettres en
+majuscules sont correctement converties en minuscules (par appel à la fonction
+`towlower`), en plus de l'intervalle de `A` à `Z`.
Prototype :
@@ -855,10 +874,9 @@ Cette fonction n'est pas disponible dans l'API script.
==== strcmp_ignore_chars
-_Mis à jour dans la 1.0._
+_Mis à jour dans la 1.0, 3.8._
-Comparer deux chaînes indépendemment de la locale (et en option de la casse), en
-ignorant des caractères.
+Comparer deux chaînes en ignorant des caractères.
Prototype :
@@ -876,6 +894,12 @@ Paramètres :
* _chars_ignored_ : chaîne avec les caractères à ignorer
* _case_sensitive_ : 1 pour une comparaison tenant compte de la casse, sinon 0
+[NOTE]
+Le comportement a changé dans la version 3.8 lorsque _case_sensitive_ est
+positionné à 0 : désormais toutes les lettres en majuscules sont correctement
+converties en minuscules (par appel à la fonction `towlower`), en plus de
+l'intervalle de `A` à `Z`.
+
Valeur de retour :
* -1 si string1 < string2
@@ -894,9 +918,14 @@ Cette fonction n'est pas disponible dans l'API script.
==== strcasestr
-_Mis à jour dans la 1.3._
+_Mis à jour dans la 1.3, 3.8._
-Rechercher une chaîne indépendemment de la locale et de la casse.
+Rechercher une chaîne indépendemment de la casse.
+
+[NOTE]
+Le comportement a changé dans la version 3.8 : désormais toutes les lettres en
+majuscules sont correctement converties en minuscules (par appel à la fonction
+`towlower`), en plus de l'intervalle de `A` à `Z`.
Prototype :
@@ -971,7 +1000,7 @@ length = weechat.strlen_screen("é") # 1
==== string_match
-_Mis à jour dans la 1.0._
+_Mis à jour dans la 1.0, 3.8._
Vérifier si une chaîne correspond à un masque.
@@ -994,6 +1023,12 @@ Paramètres :
Depuis la version 1.0, les caractères joker sont autorisés à l'intérieur du
masque (pas seulement au début et à la fin du masque).
+[NOTE]
+Le comportement a changé dans la version 3.8 lorsque _case_sensitive_ est
+positionné à 0 : désormais toutes les lettres en majuscules sont correctement
+converties en minuscules (par appel à la fonction `towlower`), en plus de
+l'intervalle de `A` à `Z`.
+
Valeur de retour :
* 1 si la chaîne correspond au masque, sinon 0
@@ -1026,7 +1061,7 @@ match5 = weechat.string_match("abcdef", "*b*d*", 0) # == 1
==== string_match_list
-_WeeChat ≥ 2.5._
+_WeeChat ≥ 2.5, mis à jour dans la 3.8._
Vérifier si une chaîne correspond à une liste de masques. Des masques négatifs
sont autorisés avec le format "!mot". Un masque négatif a une priorité plus
@@ -1048,6 +1083,12 @@ Paramètres :
<<_string_match,string_match>>
* _case_sensitive_ : 1 pour une comparaison tenant compte de la casse, sinon 0
+[NOTE]
+Le comportement a changé dans la version 3.8 lorsque _case_sensitive_ est
+positionné à 0 : désormais toutes les lettres en majuscules sont correctement
+converties en minuscules (par appel à la fonction `towlower`), en plus de
+l'intervalle de `A` à `Z`.
+
Valeur de retour :
* 1 si la chaîne correspond à la liste de masques (au moins un masque correspond
@@ -3687,10 +3728,15 @@ Cette fonction n'est pas disponible dans l'API script.
==== utf8_charcasecmp
-_Mis à jour dans la 1.0._
+_Mis à jour dans la 1.0, 3.8._
Comparer deux caractères UTF-8 en ignorant la casse.
+[NOTE]
+Le comportement a changé dans la version 3.8 : désormais toutes les lettres en
+majuscules sont correctement converties en minuscules (par appel à la fonction
+`towlower`), en plus de l'intervalle de `A` à `Z`.
+
Prototype :
[source,c]
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 01604d555..8b226a562 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -656,9 +656,13 @@ Questa funzione non è disponibile nelle API per lo scripting.
_Updated in 3.8._
// TRANSLATION MISSING
-Return a string with uppercase letters converted to lowercase. +
-This function is locale independent: only letters `A` to `Z` without accents
-are converted to lowercase. All other chars are kept as-is.
+Return a string with uppercase letters converted to lowercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
Prototipo:
@@ -680,7 +684,7 @@ Esempio in C:
[source,c]
----
-char *str = weechat_string_tolower ("ABCD_É"); /* result: "abcd_É" */
+char *str = weechat_string_tolower ("ABCD_É"); /* result: "abcd_é" */
/* ... */
free (str);
----
@@ -694,9 +698,13 @@ Questa funzione non è disponibile nelle API per lo scripting.
_Updated in 3.8._
// TRANSLATION MISSING
-Return a string with lowercase letters converted to uppercase. +
-This function is locale independent: only letters `a` to `z` without accents
-are converted to uppercase. All other chars are kept as-is.
+Return a string with lowercase letters converted to uppercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all lowercase letters are properly
+converted to uppercase (by calling function `towupper`), in addition to the
+range `a` to `z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
Prototipo:
@@ -718,7 +726,7 @@ Esempio in C:
[source,c]
----
-char *str = weechat_string_toupper ("abcd_é"); /* result: "ABCD_é" */
+char *str = weechat_string_toupper ("abcd_é"); /* result: "ABCD_É" */
/* ... */
free (str);
----
@@ -729,9 +737,16 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== strcasecmp
// TRANSLATION MISSING
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
-Confronta stringa non sensibile alle maiuscole e alla localizzazione.
+// TRANSLATION MISSING
+Case insensitive string comparison.
+
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Prototipo:
@@ -755,7 +770,9 @@ Esempio in C:
[source,c]
----
-int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */
+int diff;
+diff = weechat_strcasecmp ("aaa", "CCC"); /* == -1 */
+diff = weechat_strcasecmp ("noël", "NOËL"); /* == 0 */
----
[NOTE]
@@ -807,10 +824,16 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== strncasecmp
// TRANSLATION MISSING
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
-Confronta stringa indipendente non sensibile alle maiuscole e alla
-localizzazione, per un numero _max_ di caratteri.
+// TRANSLATION MISSING
+Case insensitive string comparison, for _max_ chars.
+
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Prototipo:
@@ -888,10 +911,10 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== strcmp_ignore_chars
// TRANSLATION MISSING
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
-Confronta una stringa localizzata (e opzionalmente non sensibile alle
-maiuscole), ignorando alcuni caratteri.
+// TRANSLATION MISSING
+String comparison ignoring some chars.
Prototipo:
@@ -909,6 +932,12 @@ Argomenti:
* _chars_ignored_: stringa con caratteri da ignorare
* _case_sensitive_: 1 per il confronto sensibile alle maiuscole, altrimenti 0
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Valore restituito:
* -1 se stringa1 < stringa2
@@ -928,10 +957,16 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== strcasestr
// TRANSLATION MISSING
-_Updated in 1.3._
+_Updated in 1.3, 3.8._
+
+// TRANSLATION MISSING
+Case insensitive string search.
-Cerca una stringa non sensibile alle maiuscole e indipendente dalla
-localizzazione.
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Prototipo:
@@ -1010,7 +1045,7 @@ length = weechat.strlen_screen("é") # 1
==== string_match
// TRANSLATION MISSING
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
Verifica se una stringa coincide ad una mask.
@@ -1035,6 +1070,12 @@ Argomenti:
Since version 1.0, wildcards are allowed inside the mask
(not only beginning/end of mask).
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Valore restituito:
* 1 se la stringa coincide alla mask, altrimenti 0
@@ -1067,7 +1108,8 @@ match5 = weechat.string_match("abcdef", "*b*d*", 0) # == 1
==== string_match_list
-_WeeChat ≥ 2.5._
+// TRANSLATION MISSING
+_WeeChat ≥ 2.5, updated in 3.8._
// TRANSLATION MISSING
Check if a string matches a list of masks where negative mask is allowed
@@ -1090,6 +1132,12 @@ Argomenti:
is compared to the string with the function <<_string_match,string_match>>
* _case_sensitive_: 1 for case sensitive comparison, otherwise 0
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Valore restituito:
// TRANSLATION MISSING
@@ -3773,10 +3821,16 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== utf8_charcasecmp
// TRANSLATION MISSING
-_Updated in 1.0._
+_Updated in 1.0, 3.8._
Confronta due caratteri UTF-8, ignorando la sensibilità alle maiuscole.
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
+
Prototipo:
[source,c]
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 0b5b042bb..c9dd3152b 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -633,9 +633,13 @@ free (str);
_WeeChat バージョン 3.8 で更新。_
// TRANSLATION MISSING
-Return a string with uppercase letters converted to lowercase. +
-This function is locale independent: only letters `A` to `Z` without accents
-are converted to lowercase. All other chars are kept as-is.
+Return a string with uppercase letters converted to lowercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
プロトタイプ:
@@ -657,7 +661,7 @@ C 言語での使用例:
[source,c]
----
-char *str = weechat_string_tolower ("ABCD_É"); /* result: "abcd_É" */
+char *str = weechat_string_tolower ("ABCD_É"); /* result: "abcd_é" */
/* ... */
free (str);
----
@@ -670,9 +674,13 @@ free (str);
_WeeChat バージョン 3.8 で更新。_
// TRANSLATION MISSING
-Return a string with lowercase letters converted to uppercase. +
-This function is locale independent: only letters `a` to `z` without accents
-are converted to uppercase. All other chars are kept as-is.
+Return a string with lowercase letters converted to uppercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all lowercase letters are properly
+converted to uppercase (by calling function `towupper`), in addition to the
+range `a` to `z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
プロトタイプ:
@@ -694,7 +702,7 @@ C 言語での使用例:
[source,c]
----
-char *str = weechat_string_toupper ("abcd_é"); /* result: "ABCD_é" */
+char *str = weechat_string_toupper ("abcd_é"); /* result: "ABCD_É" */
/* ... */
free (str);
----
@@ -704,15 +712,24 @@ free (str);
==== strcasecmp
-_WeeChat バージョン 1.0 で更新。_
+_WeeChat バージョン 1.0, 3.8 で更新。_
-ロケールと大文字小文字を無視して文字列を比較。
+// TRANSLATION MISSING
+Case insensitive string comparison.
+
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
プロトタイプ:
[source,c]
----
-int weechat_strcasecmp (const char *string1, const char *string2);
+int diff;
+diff = weechat_strcasecmp ("aaa", "CCC"); /* == -1 */
+diff = weechat_strcasecmp ("noël", "NOËL"); /* == 0 */
----
引数:
@@ -730,7 +747,7 @@ C 言語での使用例:
[source,c]
----
-int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */
+int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -1 */
----
[NOTE]
@@ -781,7 +798,14 @@ int diff = weechat_strcasecmp_range ("nick{away}", "NICK[away]", 29); /* == 0 *
_WeeChat バージョン 1.0 で更新。_
-ロケールと大文字小文字を無視して _max_ 文字だけ文字列を比較。
+// TRANSLATION MISSING
+Case insensitive string comparison, for _max_ chars.
+
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
プロトタイプ:
@@ -857,10 +881,10 @@ int diff = weechat_strncasecmp_range ("nick{away}", "NICK[away]", 6, 29); /* ==
==== strcmp_ignore_chars
-_WeeChat バージョン 1.0 で更新。_
+_WeeChat バージョン 1.0, 3.8 で更新。_
-一部の文字列を無視して、ロケールに依存して
-(オプションで大文字小文字の区別をしない) 文字列を比較。
+// TRANSLATION MISSING
+String comparison ignoring some chars.
プロトタイプ:
@@ -878,6 +902,12 @@ int weechat_strcmp_ignore_chars (const char *string1, const char *string2,
* _chars_ignored_: 無視する文字
* _case_sensitive_: 大文字小文字を区別して比較する場合は 1、区別しない場合は 0
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
戻り値:
* string1 < string2 の場合は -1
@@ -896,9 +926,16 @@ int diff = weechat_strcmp_ignore_chars ("a-b", "--a-e", "-", 1); /* == -3 */
==== strcasestr
-_WeeChat バージョン 1.3 で更新。_
+_WeeChat バージョン 1.3, 3.8 で更新。_
+
+// TRANSLATION MISSING
+Case insensitive string search.
-ロケールと大文字小文字を区別して文字列を検索。
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
プロトタイプ:
@@ -974,7 +1011,7 @@ length = weechat.strlen_screen("é") # 1
==== string_match
-_WeeChat バージョン 1.0 で更新。_
+_WeeChat バージョン 1.0, 3.8 で更新。_
文字列がマスクにマッチするか確認。
@@ -997,6 +1034,12 @@ int weechat_string_match (const char *string, const char *mask,
WeeChat バージョン 1.0 以上の場合、ワイルドカードをマスクの内部で使うことが可能です
(マスクの最初および最後だけではありません)。
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
戻り値:
* マスクにマッチした場合は 1、それ以外は 0
@@ -1029,7 +1072,8 @@ match5 = weechat.string_match("abcdef", "*b*d*", 0) # == 1
==== string_match_list
-_WeeChat バージョン 2.5 以上で利用可。_
+// TRANSLATION MISSING
+_WeeChat ≥ 2.5, updated in 3.8._
文字列が否定マスク
(書式: "!word")
@@ -1050,6 +1094,12 @@ int weechat_string_match_list (const char *string, const char **masks,
各マスクは関数 <<_string_match,string_match>> で文字列と比較されます
* _case_sensitive_: 大文字と小文字を区別する場合は 1、区別しない場合は 0
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
戻り値:
* 1 if string matches list of masks (at least one mask matches and no negative
@@ -3697,10 +3747,16 @@ int diff = weechat_utf8_charcmp ("aaa", "ccc"); /* == -2 */
==== utf8_charcasecmp
-_WeeChat バージョン 1.0 で更新。_
+_WeeChat バージョン 1.0, 3.8 で更新。_
大文字小文字の違いを無視して、2 つの UTF-8 文字を比較。
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
+
プロトタイプ:
[source,c]
diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc
index 3ec897791..c32f7202b 100644
--- a/doc/sr/weechat_plugin_api.sr.adoc
+++ b/doc/sr/weechat_plugin_api.sr.adoc
@@ -594,9 +594,13 @@ free (str);
_Ажурирано у верзији 3.8._
// TRANSLATION MISSING
-Return a string with uppercase letters converted to lowercase. +
-This function is locale independent: only letters `A` to `Z` without accents
-are converted to lowercase. All other chars are kept as-is.
+Return a string with uppercase letters converted to lowercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
Прототип:
@@ -618,7 +622,7 @@ C пример:
[source,c]
----
-char *str = weechat_string_tolower ("ABCD_É"); /* result: „abcd_É” */
+char *str = weechat_string_tolower ("ABCD_É"); /* result: „abcd_é” */
/* ... */
free (str);
----
@@ -631,9 +635,13 @@ free (str);
_Ажурирано у верзији 3.8._
// TRANSLATION MISSING
-Return a string with lowercase letters converted to uppercase. +
-This function is locale independent: only letters `a` to `z` without accents
-are converted to uppercase. All other chars are kept as-is.
+Return a string with lowercase letters converted to uppercase.
+
+[NOTE]
+Behavior has changed in version 3.8: now all lowercase letters are properly
+converted to uppercase (by calling function `towupper`), in addition to the
+range `a` to `z`. +
+Moreover, a newly allocated string is returned and must be freed after use.
Прототип:
@@ -655,7 +663,7 @@ C пример:
[source,c]
----
-char *str = weechat_string_toupper ("abcd_é"); /* result: „ABCD_é” */
+char *str = weechat_string_toupper ("abcd_é"); /* result: „ABCD_É” */
/* ... */
free (str);
----
@@ -665,9 +673,16 @@ free (str);
==== strcasecmp
-_Ажурирано у верзији 1.0._
+_Ажурирано у верзији 1.0, 3.8._
-Поређење стрингова независно од величине слова и локал подешавања.
+// TRANSLATION MISSING
+Case insensitive string comparison.
+
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Прототип:
@@ -691,7 +706,9 @@ C пример:
[source,c]
----
-int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */
+int diff;
+diff = weechat_strcasecmp ("aaa", "CCC"); /* == -1 */
+diff = weechat_strcasecmp ("noël", "NOËL"); /* == 0 */
----
[NOTE]
@@ -742,7 +759,14 @@ int diff = weechat_strcasecmp_range ("nick{away}", "NICK[away]", 29); /* == 0 *
_Ажурирано у верзији 1.0._
-Поређење стрингова независно од величине слова и локал подешавања, за _max_ карактера.
+// TRANSLATION MISSING
+Case insensitive string comparison, for _max_ chars.
+
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Прототип:
@@ -817,9 +841,10 @@ int diff = weechat_strncasecmp_range ("nick{away}", "NICK[away]", 6, 29); /* ==
==== strcmp_ignore_chars
-_Ажурирано у верзији 1.0._
+_Ажурирано у верзији 1.0, 3.8._
-Поређење стрингова према локал подешавању (и необавезно независно од величине слова), уз игнорисање неких карактера.
+// TRANSLATION MISSING
+String comparison ignoring some chars.
Прототип:
@@ -837,6 +862,12 @@ int weechat_strcmp_ignore_chars (const char *string1, const char *string2,
* _chars_ignored_: стринг са карактерима који се игноришу
* _case_sensitive_: 1 за поређење које прави разлику у величини слова, у супротном 0
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Повратна вредност:
* -1 ако је string1 < string2
@@ -855,9 +886,16 @@ int diff = weechat_strcmp_ignore_chars ("a-b", "--a-e", "-", 1); /* == -3 */
==== strcasestr
-_Ажурирано у верзији 1.3._
+_Ажурирано у верзији 1.3, 3.8._
+
+// TRANSLATION MISSING
+Case insensitive string search.
-Претрага стринга независно од величине слова и локал подешавања.
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
Прототип:
@@ -931,7 +969,7 @@ length = weechat.strlen_screen("é") # 1
==== string_match
-_Ажурирано у верзији 1.0._
+_Ажурирано у верзији 1.0, 3.8._
Провера да ли стринг задовољава маску.
@@ -952,6 +990,12 @@ int weechat_string_match (const char *string, const char *mask,
[NOTE]
Почевши од верзије 1.0, у маски се дозвољава употреба џокера (не само на почетку/крају маске).
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Повратна вредност:
* 1 ако стринг задовољава маску, у супротном 0
@@ -984,7 +1028,7 @@ match5 = weechat.string_match("abcdef", "*b*d*", 0) # == 1
==== string_match_list
-_WeeChat ≥ 2.5._
+_WeeChat ≥ 2.5, ажурирано у верзији 3.8._
Проверава да ли стринг задовољава листу маски, при чему је дозвољена употреба негативних маски у формату „!реч”. Негативна маска има виши приоритет у односу на стандардну маску.
@@ -1002,6 +1046,12 @@ int weechat_string_match_list (const char *string, const char **masks,
* _masks_: листа маски, са NULL након последње маске у листи; свака маска се пореди са стрингом функцијом <<_string_match,string_match>>
* _case_sensitive_: 1 за поређење које прави разлику у величини слова, у супротном 0
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8 when _case_sensitive_ is set to 0: now all
+uppercase letters are properly converted to lowercase (by calling function
+`towlower`), in addition to the range `A` to `Z`.
+
Повратна вредност:
* 1 ако стринг задовољава листу маски (барем једна од маски је задовољена и ниједна од негативних маски), у супротном 0
@@ -3504,10 +3554,16 @@ int diff = weechat_utf8_charcmp ("aaa", "ccc"); /* == -2 */
==== utf8_charcasecmp
-_Ажурирано у верзији 1.0._
+_Ажурирано у верзији 1.0, 3.8._
Пореди два UTF-8 карактера, уз игнорисање разлике у величини слова.
+// TRANSLATION MISSING
+[NOTE]
+Behavior has changed in version 3.8: now all uppercase letters are properly
+converted to lowercase (by calling function `towlower`), in addition to the
+range `A` to `Z`.
+
Прототип:
[source,c]