std::collate::compare, std::collate::do_compare
De cppreference.com
(Redirecionado de cpp/locale/collate/do compare)
|
|
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>| Definido no cabeçalho <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)
função de membro público, chama a
do_compare função virtual protegido membro da classe derivada mais.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)
Compara o
[low1, high1) seqüência de caracteres para o [low2, high2) seqüência de caracteres, utilizando regras esta localidade do agrupamento, e retorna 1 se a primeira string segue o segundo, -1 se a string primeiro precede o segundo, zero se as duas seqüências são equivalentes.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.
Parâmetros
| low1 | - | ponteiro para o primeiro caractere da primeira cadeia
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 | - | um passado o ponteiro final para a primeira cadeia
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 | - | ponteiro para o primeiro caractere da segunda corda
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 | - | um passado o ponteiro fim para a segunda corda
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. |
Valor de retorno
1 se a primeira cadeia é maior que o segundo (ou seja, segue o segundo na ordem de agrupamento), -1 se o primeiro string é menor do que o segundo (precede o segundo na ordem de agrupamento), zero se as duas seqüências são equivalente.
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.
Notas
Ordem de comparação é tipicamente comparação de maiúsculas e minúsculas lexicográfica de acordo com o alfabeto local, mas em algumas localidades, grupos de personagens comparar unidades de agrupamento como individuais. Por exemplo, "ch" em checo segue "h" e precede "i", e "ng" em galês segue "g" e precede "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.
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
Veja também
compara duas seqüências de acordo com a localidade 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. (função) | |
compara duas seqüências de largura, de acordo com a localidade 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. (função) | |
| lexicographically compares two strings using this locale's collate facet (of std::locale função pública membro)
| |