tmp/tmpbvxkm1fr/{from.md → to.md}
RENAMED
|
@@ -28,20 +28,20 @@ namespace std {
|
|
| 28 |
```
|
| 29 |
|
| 30 |
The class `collate<charT>` provides features for use in the collation
|
| 31 |
(comparison) and hashing of strings. A locale member function template,
|
| 32 |
`operator()`, uses the collate facet to allow a locale to act directly
|
| 33 |
-
as the predicate argument for standard algorithms
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
|
| 39 |
Each function compares a string of characters `*p` in the range \[`low`,
|
| 40 |
`high`).
|
| 41 |
|
| 42 |
-
#####
|
| 43 |
|
| 44 |
``` cpp
|
| 45 |
int compare(const charT* low1, const charT* high1,
|
| 46 |
const charT* low2, const charT* high2) const;
|
| 47 |
```
|
|
@@ -58,22 +58,22 @@ string_type transform(const charT* low, const charT* high) const;
|
|
| 58 |
long hash(const charT* low, const charT* high) const;
|
| 59 |
```
|
| 60 |
|
| 61 |
*Returns:* `do_hash(low, high)`.
|
| 62 |
|
| 63 |
-
#####
|
| 64 |
|
| 65 |
``` cpp
|
| 66 |
int do_compare(const charT* low1, const charT* high1,
|
| 67 |
const charT* low2, const charT* high2) const;
|
| 68 |
```
|
| 69 |
|
| 70 |
*Returns:* `1` if the first string is greater than the second, `-1` if
|
| 71 |
less, zero otherwise. The specializations required in
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
|
| 76 |
``` cpp
|
| 77 |
string_type do_transform(const charT* low, const charT* high) const;
|
| 78 |
```
|
| 79 |
|
|
|
|
| 28 |
```
|
| 29 |
|
| 30 |
The class `collate<charT>` provides features for use in the collation
|
| 31 |
(comparison) and hashing of strings. A locale member function template,
|
| 32 |
`operator()`, uses the collate facet to allow a locale to act directly
|
| 33 |
+
as the predicate argument for standard algorithms [[algorithms]] and
|
| 34 |
+
containers operating on strings. The specializations required in
|
| 35 |
+
[[locale.category.facets]] [[locale.category]], namely `collate<char>`
|
| 36 |
+
and `collate<wchar_t>`, apply lexicographic ordering
|
| 37 |
+
[[alg.lex.comparison]].
|
| 38 |
|
| 39 |
Each function compares a string of characters `*p` in the range \[`low`,
|
| 40 |
`high`).
|
| 41 |
|
| 42 |
+
##### Members <a id="locale.collate.members">[[locale.collate.members]]</a>
|
| 43 |
|
| 44 |
``` cpp
|
| 45 |
int compare(const charT* low1, const charT* high1,
|
| 46 |
const charT* low2, const charT* high2) const;
|
| 47 |
```
|
|
|
|
| 58 |
long hash(const charT* low, const charT* high) const;
|
| 59 |
```
|
| 60 |
|
| 61 |
*Returns:* `do_hash(low, high)`.
|
| 62 |
|
| 63 |
+
##### Virtual functions <a id="locale.collate.virtuals">[[locale.collate.virtuals]]</a>
|
| 64 |
|
| 65 |
``` cpp
|
| 66 |
int do_compare(const charT* low1, const charT* high1,
|
| 67 |
const charT* low2, const charT* high2) const;
|
| 68 |
```
|
| 69 |
|
| 70 |
*Returns:* `1` if the first string is greater than the second, `-1` if
|
| 71 |
less, zero otherwise. The specializations required in
|
| 72 |
+
[[locale.category.facets]][[locale.category]], namely `collate<char>`
|
| 73 |
+
and `collate<wchar_t>`, implement a lexicographical
|
| 74 |
+
comparison [[alg.lex.comparison]].
|
| 75 |
|
| 76 |
``` cpp
|
| 77 |
string_type do_transform(const charT* low, const charT* high) const;
|
| 78 |
```
|
| 79 |
|