std::collate::compare, std::collate::do_compare
Aus 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>| definiert 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)
öffentliche Member-Funktion ruft die geschützte virtuelle Member-Funktion
do_compare der am meisten abgeleiteten Klasse .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)
Vergleicht die Zeichenfolge
[low1, high1) der Zeichenfolge [low2, high2) mit dieser Ländereinstellung Kollatierung und gibt 1 zurück, wenn der erste String folgt die zweite, -1, wenn der erste String vor dem zweiten, Null, wenn die zwei Zeichenfolgen identisch sind .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.
Parameter
| low1 | - | Zeiger auf das erste Zeichen der ersten Zeichenfolge
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 | - | ein über das Ende Zeiger für die erste Zeichenfolge
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 | - | Zeiger auf das erste Zeichen der zweiten Zeichenfolge
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 | - | ein über das Ende Zeiger für die zweite Zeichenkette
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. |
Rückgabewert
1, wenn die erste Zeichenfolge größer ist als die zweite (das heißt, folgt der zweite in der Sortierreihenfolge), -1, wenn das erste Zeichenfolge kleiner als die zweite (vor dem zweiten in der Sortierreihenfolge) gleich Null, wenn die beiden Zeichenfolgen entspricht .
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
Sortierreihenfolge ist in der Regel lexikographische Groß-und Kleinschreibung Vergleich gemäß der Ländereinstellung Alphabet, aber in manchen Gebietsschemas vergleichen Gruppen von Zeichen als einzelne Sortierung Einheiten. Zum Beispiel folgt "ch" in der Tschechischen "h" und vor "i" und "ng" in Welsh folgt "g" und vor "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.
Beispiel
| This section is incomplete Reason: no example |
Siehe auch
vergleicht zwei Strings in Übereinstimmung mit dem aktuellen Gebietsschema 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. (Funktion) | |
vergleicht zwei Wide-Strings in Übereinstimmung mit dem aktuellen Gebietsschema 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. (Funktion) | |
| lexicographically compares two strings using this locale's collate facet (öffentliche Elementfunktion of std::locale)
| |