Espaços nominais
Variantes
Acções

std::collate::compare, std::collate::do_compare

Da cppreference.com
< cpp‎ | locale‎ | collate

 
 
Biblioteca localizações
Localidades e facetas
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
Classificação de caracteres
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversões
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet classes base da categoria
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Categorias faceta
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Específicos da localidade facetas
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facetas de conversão de código
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8(C++11)
codecvt_utf16(C++11)
C localidade
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
std::collate
Funções de membro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
collate::collate
collate::~collate
collate::compare
collate::do_compare
collate::transform
collate::do_transform
collate::hash
collate::do_hash
 
Defined in header <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.
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.

Índice

[editar] 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.

[editar] 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.

[editar] 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.

[editar] Exemplo

[editar] 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) [edit]
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) [edit]
lexicographically compares two strings using this locale's collate facet
(of std::locale função pública membro) [edit]