From 0dd1d4133b1e49646ec4fc7cfb256dc20028f238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 24 Dec 2022 17:52:31 +0100 Subject: [PATCH] doc/api: mention "UTF-8" in char/string comparison functions --- ReleaseNotes.adoc | 2 +- doc/en/weechat_plugin_api.en.adoc | 30 ++++++++++---------- doc/fr/weechat_plugin_api.fr.adoc | 29 +++++++++---------- doc/it/weechat_plugin_api.it.adoc | 29 +++++++++---------- doc/ja/weechat_plugin_api.ja.adoc | 30 ++++++++++---------- doc/sr/weechat_plugin_api.sr.adoc | 30 ++++++++++---------- src/core/wee-string.c | 46 +++++++++++++++---------------- 7 files changed, 102 insertions(+), 94 deletions(-) diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc index 6a24620d4..0f44bbb16 100644 --- a/ReleaseNotes.adoc +++ b/ReleaseNotes.adoc @@ -24,7 +24,7 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog] === Return code of string comparison functions The following functions now return arithmetic result of subtracting the last -compared char in string2 from the last compared char in string1: +compared UTF-8 char in string2 from the last compared UTF-8 char in string1: * string_charcmp * string_charcasecmp diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 53a67b965..6b558350e 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -710,8 +710,8 @@ Arguments: * _string1_: first string for comparison * _string2_: second string for comparison -Return value: arithmetic result of subtracting the first char in _string2_ from -the first char in _string1_: +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +from the first UTF-8 char in _string1_: * < 0 if char1 < char2 * 0 if char1 == char2 @@ -750,8 +750,9 @@ Arguments: * _string1_: first string for comparison * _string2_: second string for comparison -Return value: arithmetic result of subtracting the first char in _string2_ -(converted to lowercase) from the first char in _string1_ (converted to lowercase): +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +(converted to lowercase) from the first UTF-8 char in _string1_ (converted to +lowercase): * < 0 if char1 < char2 * 0 if char1 == char2 @@ -790,8 +791,8 @@ Arguments: * _string1_: first string for comparison * _string2_: second string for comparison -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): * < 0 if string1 < string2 @@ -836,8 +837,8 @@ Arguments: [NOTE] Values 29 and 30 are used by some protocols like IRC. -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): * < 0 if string1 < string2 @@ -878,8 +879,8 @@ Arguments: * _string2_: second string for comparison * _max_: max chars to compare -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): * < 0 if string1 < string2 @@ -923,8 +924,8 @@ Arguments: [NOTE] Values 29 and 30 are used by some protocols like IRC. -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): * < 0 if string1 < string2 @@ -968,9 +969,10 @@ 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: arithmetic result of subtracting the last compared char in +Return value: arithmetic result of subtracting the last compared UTF-8 char in _string2_ (converted to lowercase if _case_sentitive_ is set to 0) from the last -compared char in _string1_ (converted to lowercase if _case_sensitive_ is set to 0): +compared UTF-8 char in _string1_ (converted to lowercase if _case_sensitive_ is +set to 0): * < 0 if string1 < string2 * 0 if string1 == string2 diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 6105b8062..fbe5ebdf7 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -724,8 +724,8 @@ Paramètres : * _string1_ : première chaîne pour la comparaison * _string2_ : seconde chaîne pour la comparaison -Valeur de retour : résultat de la soustraction du premier caractère dans _string2_ -du premier caractère dans _string1_ : +Valeur de retour : résultat de la soustraction du premier caractère UTF-8 dans +_string2_ du premier caractère UTF-8 dans _string1_ : * < 0 si char1 < char2 * 0 si char1 == char2 @@ -764,8 +764,9 @@ Paramètres : * _string1_ : première chaîne pour la comparaison * _string2_ : seconde chaîne pour la comparaison -Valeur de retour : résultat de la soustraction du premier caractère dans _string2_ -(converti en minuscule) du premier caractère dans _string1_ (converti en minuscule) : +Valeur de retour : résultat de la soustraction du premier caractère UTF-8 dans +_string2_ (converti en minuscule) du premier caractère UTF-8 dans _string1_ +(converti en minuscule) : * < 0 si char1 < char2 * 0 si char1 == char2 @@ -804,8 +805,8 @@ 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 comparé -dans _string2_ (converti en minuscule) du dernier caractère comparé dans +Valeur de retour : résultat de la soustraction du dernier caractère UTF-8 comparé +dans _string2_ (converti en minuscule) du dernier caractère UTF-8 comparé dans _string1_ (converti en minuscule) : * < 0 si string1 < string2 @@ -850,8 +851,8 @@ Paramètres : [NOTE] Les valeurs 29 et 30 sont utilisés par quelques protocoles comme IRC. -Valeur de retour : résultat de la soustraction du dernier caractère comparé -dans _string2_ (converti en minuscule) du dernier caractère comparé dans +Valeur de retour : résultat de la soustraction du dernier caractère UTF-8 comparé +dans _string2_ (converti en minuscule) du dernier caractère UTF-8 comparé dans _string1_ (converti en minuscule) : * < 0 si string1 < string2 @@ -892,8 +893,8 @@ Paramètres : * _string2_ : seconde chaîne à comparer * _max_ : nombre maximum de caractères à comparer -Valeur de retour : résultat de la soustraction du dernier caractère comparé -dans _string2_ (converti en minuscule) du dernier caractère comparé dans +Valeur de retour : résultat de la soustraction du dernier caractère UTF-8 comparé +dans _string2_ (converti en minuscule) du dernier caractère UTF-8 comparé dans _string1_ (converti en minuscule) : * < 0 si string1 < string2 @@ -937,8 +938,8 @@ Paramètres : [NOTE] Les valeurs 29 et 30 sont utilisés par quelques protocoles comme IRC. -Valeur de retour : résultat de la soustraction du dernier caractère comparé -dans _string2_ (converti en minuscule) du dernier caractère comparé dans +Valeur de retour : résultat de la soustraction du dernier caractère UTF-8 comparé +dans _string2_ (converti en minuscule) du dernier caractère UTF-8 comparé dans _string1_ (converti en minuscule) : * < 0 si string1 < string2 @@ -983,9 +984,9 @@ positionné à 0 : désormais toutes les lettres en majuscules sont correctemen converties en minuscules (par appel à la fonction `towlower`), en plus de l'intervalle de `A` à `Z`. -Valeur de retour : résultat de la soustraction du dernier caractère comparé +Valeur de retour : résultat de la soustraction du dernier caractère UTF-8 comparé dans _string2_ (converti en minuscule si _case_sensitive_ est positionné à 0) -du dernier caractère comparé dans _string1_ (converti en minuscule si +du dernier caractère UTF-8 comparé dans _string1_ (converti en minuscule si _case_sensitive_ est positionné à 0) : * < 0 si string1 < string2 diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 4ccb9029f..3f0b750de 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -754,8 +754,8 @@ Argomenti: * _string2_: seconda stringa da comparare // TRANSLATION MISSING -Return value: arithmetic result of subtracting the first char in _string2_ from -the first char in _string1_: +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +from the first UTF-8 char in _string1_: // TRANSLATION MISSING * < 0 if char1 < char2 @@ -798,8 +798,8 @@ Argomenti: * _string2_: seconda stringa da comparare // TRANSLATION MISSING -Return value: arithmetic result of subtracting the first char in _string2_ -(converted to lowercase) from the first char in _string1_ (converted to lowercase): +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +(converted to lowercase) from the first UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING * < 0 if char1 < char2 @@ -843,8 +843,8 @@ Argomenti: * _string2_: seconda stringa da comparare // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -892,8 +892,8 @@ Argomenti: I valori 29 e 30 vengono usati da alcuni protocolli come IRC. // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -939,8 +939,8 @@ Argomenti: * _max_: numero massimo di caratteri da comparare // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -987,8 +987,8 @@ Argomenti: I valori 29 e 30 vengono usati da alcuni protocolli come IRC. // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -1037,9 +1037,10 @@ uppercase letters are properly converted to lowercase (by calling function `towlower`), in addition to the range `A` to `Z`. // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in +Return value: arithmetic result of subtracting the last compared UTF-8 char in _string2_ (converted to lowercase if _case_sentitive_ is set to 0) from the last -compared char in _string1_ (converted to lowercase if _case_sensitive_ is set to 0): +compared UTF-8 char in _string1_ (converted to lowercase if _case_sensitive_ is +set to 0): // TRANSLATION MISSING * < 0 if string1 < string2 diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 0c776ba22..d58e2b20c 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -729,8 +729,8 @@ int weechat_string_charcmp (const char *string1, const char *string2); * _string2_: 2 番目の比較文字列 // TRANSLATION MISSING -Return value: arithmetic result of subtracting the first char in _string2_ from -the first char in _string1_: +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +from the first UTF-8 char in _string1_: // TRANSLATION MISSING * < 0 if char1 < char2 @@ -772,8 +772,9 @@ int weechat_string_charcasecmp (const char *string1, const char *string2); * _string2_: 2 番目の比較文字列 // TRANSLATION MISSING -Return value: arithmetic result of subtracting the first char in _string2_ -(converted to lowercase) from the first char in _string1_ (converted to lowercase): +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +(converted to lowercase) from the first UTF-8 char in _string1_ (converted to +lowercase): // TRANSLATION MISSING * < 0 if char1 < char2 @@ -816,8 +817,8 @@ int weechat_strcasecmp (const char *string1, const char *string2); * _string2_: 2 番目の比較対象の文字列 // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -863,8 +864,8 @@ int weechat_strcasecmp_range (const char *string1, const char *string2, int rang 29 と 30 は IRC など一部のプロトコルで使います。 // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -909,8 +910,8 @@ int weechat_strncasecmp (const char *string1, const char *string2, int max); * _max_: 比較する文字数の最大値 // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -956,8 +957,8 @@ int weechat_strncasecmp_range (const char *string1, const char *string2, int max 29 と 30 は IRC など一部のプロトコルで使います。 // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -1005,9 +1006,10 @@ uppercase letters are properly converted to lowercase (by calling function `towlower`), in addition to the range `A` to `Z`. // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in +Return value: arithmetic result of subtracting the last compared UTF-8 char in _string2_ (converted to lowercase if _case_sentitive_ is set to 0) from the last -compared char in _string1_ (converted to lowercase if _case_sensitive_ is set to 0): +compared UTF-8 char in _string1_ (converted to lowercase if _case_sensitive_ is +set to 0): // TRANSLATION MISSING * < 0 if string1 < string2 diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 2095b564e..f7f511c53 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -690,8 +690,8 @@ int weechat_string_charcmp (const char *string1, const char *string2); * _string2_: други стринг за поређење // TRANSLATION MISSING -Return value: arithmetic result of subtracting the first char in _string2_ from -the first char in _string1_: +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +from the first UTF-8 char in _string1_: // TRANSLATION MISSING * < 0 if char1 < char2 @@ -733,8 +733,9 @@ int weechat_string_charcasecmp (const char *string1, const char *string2); * _string2_: други стринг за поређење // TRANSLATION MISSING -Return value: arithmetic result of subtracting the first char in _string2_ -(converted to lowercase) from the first char in _string1_ (converted to lowercase): +Return value: arithmetic result of subtracting the first UTF-8 char in _string2_ +(converted to lowercase) from the first UTF-8 char in _string1_ (converted to +lowercase): // TRANSLATION MISSING * < 0 if char1 < char2 @@ -779,8 +780,8 @@ int weechat_strcasecmp (const char *string1, const char *string2); Повратна вредност: // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -826,8 +827,8 @@ int weechat_strcasecmp_range (const char *string1, const char *string2, int rang Вредности 29 и 30 користе неки протоколи, као што је IRC. // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -872,8 +873,8 @@ int weechat_strncasecmp (const char *string1, const char *string2, int max); * _max_: максимални број карактера који се пореде // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -918,8 +919,8 @@ int weechat_strncasecmp_range (const char *string1, const char *string2, int max Вредности 29 и 30 користе неки протоколи, као што је IRC. // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in -_string2_ (converted to lowercase) from the last compared char in _string1_ +Return value: arithmetic result of subtracting the last compared UTF-8 char in +_string2_ (converted to lowercase) from the last compared UTF-8 char in _string1_ (converted to lowercase): // TRANSLATION MISSING @@ -967,9 +968,10 @@ uppercase letters are properly converted to lowercase (by calling function `towlower`), in addition to the range `A` to `Z`. // TRANSLATION MISSING -Return value: arithmetic result of subtracting the last compared char in +Return value: arithmetic result of subtracting the last compared UTF-8 char in _string2_ (converted to lowercase if _case_sentitive_ is set to 0) from the last -compared char in _string1_ (converted to lowercase if _case_sensitive_ is set to 0): +compared UTF-8 char in _string1_ (converted to lowercase if _case_sensitive_ is +set to 0): // TRANSLATION MISSING * < 0 if string1 < string2 diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 391d23db3..64ee364b1 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -396,8 +396,8 @@ string_toupper (const char *string) /* * Compares two chars (case sensitive). * - * Returns: arithmetic result of subtracting the first char in string2 - * from the first char in string1: + * Returns: arithmetic result of subtracting the first UTF-8 char in string2 + * from the first UTF-8 char in string1: * < 0: string1 < string2 * 0: string1 == string2 * > 0: string1 > string2 @@ -412,8 +412,8 @@ string_charcmp (const char *string1, const char *string2) /* * Compares two chars (case insensitive). * - * Returns: arithmetic result of subtracting the first char in string2 - * (converted to lowercase) from the first char in string1 (converted + * Returns: arithmetic result of subtracting the first UTF-8 char in string2 + * (converted to lowercase) from the first UTF-8 char in string1 (converted * to lowercase): * < 0: string1 < string2 * 0: string1 == string2 @@ -460,9 +460,9 @@ string_charcasecmp (const char *string1, const char *string2) * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ * (ranges 29 and 30 are used by some protocols like IRC) * - * Returns: arithmetic result of subtracting the last compared char in string2 - * (converted to lowercase) from the last compared char in string1 (converted - * to lowercase): + * Returns: arithmetic result of subtracting the last compared UTF-8 char in + * string2 (converted to lowercase) from the last compared UTF-8 char in + * string1 (converted to lowercase): * < 0: string1 < string2 * 0: string1 == string2 * > 0: string1 > string2 @@ -487,9 +487,9 @@ string_charcasecmp_range (const char *string1, const char *string2, int range) /* * Compares two strings (case insensitive). * - * Returns: arithmetic result of subtracting the last compared char in string2 - * (converted to lowercase) from the last compared char in string1 (converted - * to lowercase): + * Returns: arithmetic result of subtracting the last compared UTF-8 char in + * string2 (converted to lowercase) from the last compared UTF-8 char in + * string1 (converted to lowercase): * < 0: string1 < string2 * 0: string1 == string2 * > 0: string1 > string2 @@ -525,9 +525,9 @@ string_strcasecmp (const char *string1, const char *string2) * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ * (ranges 29 and 30 are used by some protocols like IRC) * - * Returns: arithmetic result of subtracting the last compared char in string2 - * (converted to lowercase) from the last compared char in string1 (converted - * to lowercase): + * Returns: arithmetic result of subtracting the last compared UTF-8 char in + * string2 (converted to lowercase) from the last compared UTF-8 char in + * string1 (converted to lowercase): * < 0: string1 < string2 * 0: string1 == string2 * > 0: string1 > string2 @@ -554,9 +554,9 @@ string_strcasecmp_range (const char *string1, const char *string2, int range) /* * Compares two strings with max length (case insensitive). * - * Returns: arithmetic result of subtracting the last compared char in string2 - * (converted to lowercase) from the last compared char in string1 (converted - * to lowercase): + * Returns: arithmetic result of subtracting the last compared UTF-8 char in + * string2 (converted to lowercase) from the last compared UTF-8 char in + * string1 (converted to lowercase): * < 0: string1 < string2 * 0: string1 == string2 * > 0: string1 > string2 @@ -597,9 +597,9 @@ string_strncasecmp (const char *string1, const char *string2, int max) * - range = 30: A-Z [ \ ] ^ ==> a-z { | } ~ * (ranges 29 and 30 are used by some protocols like IRC) * - * Returns: arithmetic result of subtracting the last compared char in string2 - * (converted to lowercase) from the last compared char in string1 (converted - * to lowercase): + * Returns: arithmetic result of subtracting the last compared UTF-8 char in + * string2 (converted to lowercase) from the last compared UTF-8 char in + * string1 (converted to lowercase): * < 0: string1 < string2 * 0: string1 == string2 * > 0: string1 > string2 @@ -632,10 +632,10 @@ string_strncasecmp_range (const char *string1, const char *string2, int max, /* * Compares two strings, ignoring some chars. * - * Returns: arithmetic result of subtracting the last compared char in string2 - * (converted to lowercase if case_sensitive is set to 0) from the last - * compared char in string1 (converted to lowercase if case_sensitive is set - * to 0): + * Returns: arithmetic result of subtracting the last compared UTF-8 char in + * string2 (converted to lowercase if case_sensitive is set to 0) from the last + * compared UTF-8 char in string1 (converted to lowercase if case_sensitive is + * set to 0): * < 0: string1 < string2 * 0: string1 == string2 * > 0: string1 > string2