std::collate::compare, std::collate::do_compare
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Déclaré dans l'en-tête <locale>
|
||
public: int compare( const CharT* low1, const CharT* high1, const CharT* low2, const CharT* high2 ) const; |
(1) | |
protected: int do_compare( const CharT* low1, const CharT* high1, const CharT* low2, const CharT* high2 ) const; |
(2) | |
1)
fonction de membre du public, appelle le protégé
do_compare virtuelle fonction membre de la classe la plus dérivée .Original:
public member function, calls the protected virtual member function
do_compare of the most derived class.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
Compare le
[low1, high1) séquence de caractères à l'[low2, high2) séquence de caractères, en utilisant les règles de tri de cette locale, et renvoie la valeur 1 si la première chaîne suit le second, -1 si la première chaîne précède le second, nul si les deux chaînes sont équivalentes .Original:
Compares the character sequence
[low1, high1) to the character sequence [low2, high2), using this locale's collation rules, and returns 1 if the first string follows the second, -1 if the first string precedes the second, zero if the two strings are equivalent.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Paramètres
| low1 | - | pointeur sur le premier caractère de la première chaîne
Original: pointer to the first character of the first string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| high1 | - | une extrémité antérieure de l'aiguille pour la première chaîne
Original: one past the end pointer for the first string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| low2 | - | pointeur sur le premier caractère de la seconde chaîne
Original: pointer to the first character of the second string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| high2 | - | une extrémité antérieure du pointeur de la deuxième chaîne
Original: one past the end pointer for the second string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Retourne la valeur
1 si la première chaîne est plus grande que la seconde (qui est, suivant le deuxième dans l'ordre de classement), -1 si la première chaîne est inférieure à la seconde (précède le deuxième dans l'ordre de classement), nul si les deux chaînes sont équivalent .
Original:
1 if the first string is greater than the second (that is, follows the second in the collation order), -1 if the first string is less than the second (precedes the second in the collation order), zero if the two strings are equivalent.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Notes
Ordre de classement est généralement lexicographique insensible à la casse comparaison selon l'alphabet dans l'environnement local, mais dans certains endroits, des groupes de caractères comparer des unités de classement en simple. Par exemple, «ch» en tchèque suit «h» et précède «i» et «ng» en gallois suit «g» et précède «h» .
Original:
Collation order is typically lexicographic case-insensitive comparison according to the locale's alphabet, but in some locales, groups of characters compare as single collation units. For example, "ch" in Czech follows "h" and precedes "i", and "ng" in Welsh follows "g" and precedes "h".
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
compare deux chaînes en fonction de la localisation en cours Original: compares two strings in accordance to the current locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
compare deux chaînes de large, conformément à la localisation en cours Original: compares two wide strings in accordance to the current locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
compare lexicographiquement deux chaînes en utilisant les facettes de ce lieu de rassembler Original: lexicographically compares two strings using this locale's collate facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::locale)
| |