std::collate::compare, std::collate::do_compare
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Definido en el archivo de encabezado <locale>
|
||
public: int compare( const CharT* low1, const CharT* high1, |
(1) | |
protected: int do_compare( const CharT* low1, const CharT* high1, |
(2) | |
función miembro pública, llama a la función virtual protegido
2) do_compare
miembro de la clase más derivada .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.
Compara el
[low1, high1)
secuencia de caracteres a la [low2, high2)
secuencia de caracteres, utilizando las reglas de la configuración regional de intercalación, y devuelve 1 si la primera cadena sigue el -1 en segundo lugar, si la primera cadena precede al segundo cero, si las dos cadenas son 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.
Contenido |
[editar] Parámetros
low1 | - | puntero al primer carácter de la primera cadena
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 | - | un pasado el puntero del final de la primera cadena
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 | - | puntero al primer carácter de la segunda cadena
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 | - | un pasado el puntero del final de la segunda cadena
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 si la primera cadena es mayor que la segunda (es decir, sigue el segundo en el orden de clasificación), -1 si la primera cadena es menor que el segundo (precede el segundo en el orden de clasificación), cero si las dos cadenas están 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.
[editar] Notas
Para la colación es típicamente lexicográfica entre mayúsculas y minúsculas comparación de acuerdo con la configuración regional del alfabeto, pero en algunos lugares, grupos de caracteres comparar unidades de intercalación como individuales. Por ejemplo, "ch" en checo sigue "h" y precede a "i" y "ng" en galés sigue "g" y precede a "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.
[editar] Ejemplo
Esta sección está incompleta Razón: sin ejemplo |
[editar] Ver también
Compara dos cadenas de acuerdo a la configuración regional actual (función) | |
Compara dos cadenas anchas, de acuerdo a la configuración regional actual (función) | |
Compara lexicográficamente dos cadenas utilizando la faceta de intercalación de esta configuración regional. (función miembro pública de std::locale )
|