tmp/tmpgnlu0zii/{from.md → to.md}
RENAMED
|
@@ -130,19 +130,19 @@ template<class charT, class traits, class Allocator>
|
|
| 130 |
*Returns:* `lhs.compare(rhs) == 0`.
|
| 131 |
|
| 132 |
``` cpp
|
| 133 |
template<class charT, class traits, class Allocator>
|
| 134 |
bool operator==(const charT* lhs,
|
| 135 |
-
const basic_string<charT,traits,Allocator>& rhs)
|
| 136 |
```
|
| 137 |
|
| 138 |
*Returns:* `rhs == lhs`.
|
| 139 |
|
| 140 |
``` cpp
|
| 141 |
template<class charT, class traits, class Allocator>
|
| 142 |
bool operator==(const basic_string<charT,traits,Allocator>& lhs,
|
| 143 |
-
const charT* rhs)
|
| 144 |
```
|
| 145 |
|
| 146 |
*Requires:* `rhs` points to an array of at least
|
| 147 |
`traits::length(rhs) + 1` elements of `charT`.
|
| 148 |
|
|
@@ -159,19 +159,19 @@ template<class charT, class traits, class Allocator>
|
|
| 159 |
*Returns:* `!(lhs == rhs)`.
|
| 160 |
|
| 161 |
``` cpp
|
| 162 |
template<class charT, class traits, class Allocator>
|
| 163 |
bool operator!=(const charT* lhs,
|
| 164 |
-
const basic_string<charT,traits,Allocator>& rhs)
|
| 165 |
```
|
| 166 |
|
| 167 |
*Returns:* `rhs != lhs`.
|
| 168 |
|
| 169 |
``` cpp
|
| 170 |
template<class charT, class traits, class Allocator>
|
| 171 |
bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
|
| 172 |
-
const charT* rhs)
|
| 173 |
```
|
| 174 |
|
| 175 |
*Requires:* `rhs` points to an array of at least
|
| 176 |
`traits::length(rhs) + 1` elements of `charT`.
|
| 177 |
|
|
@@ -188,19 +188,19 @@ template<class charT, class traits, class Allocator>
|
|
| 188 |
*Returns:* `lhs.compare(rhs) < 0`.
|
| 189 |
|
| 190 |
``` cpp
|
| 191 |
template<class charT, class traits, class Allocator>
|
| 192 |
bool operator< (const charT* lhs,
|
| 193 |
-
const basic_string<charT,traits,Allocator>& rhs)
|
| 194 |
```
|
| 195 |
|
| 196 |
*Returns:* `rhs.compare(lhs) > 0`.
|
| 197 |
|
| 198 |
``` cpp
|
| 199 |
template<class charT, class traits, class Allocator>
|
| 200 |
bool operator< (const basic_string<charT,traits,Allocator>& lhs,
|
| 201 |
-
const charT* rhs)
|
| 202 |
```
|
| 203 |
|
| 204 |
*Returns:* `lhs.compare(rhs) < 0`.
|
| 205 |
|
| 206 |
#### `operator>` <a id="string::op>">[[string::op>]]</a>
|
|
@@ -214,19 +214,19 @@ template<class charT, class traits, class Allocator>
|
|
| 214 |
*Returns:* `lhs.compare(rhs) > 0`.
|
| 215 |
|
| 216 |
``` cpp
|
| 217 |
template<class charT, class traits, class Allocator>
|
| 218 |
bool operator> (const charT* lhs,
|
| 219 |
-
const basic_string<charT,traits,Allocator>& rhs)
|
| 220 |
```
|
| 221 |
|
| 222 |
*Returns:* `rhs.compare(lhs) < 0`.
|
| 223 |
|
| 224 |
``` cpp
|
| 225 |
template<class charT, class traits, class Allocator>
|
| 226 |
bool operator> (const basic_string<charT,traits,Allocator>& lhs,
|
| 227 |
-
const charT* rhs)
|
| 228 |
```
|
| 229 |
|
| 230 |
*Returns:* `lhs.compare(rhs) > 0`.
|
| 231 |
|
| 232 |
#### `operator<=` <a id="string::op<=">[[string::op<=]]</a>
|
|
@@ -240,19 +240,19 @@ template<class charT, class traits, class Allocator>
|
|
| 240 |
*Returns:* `lhs.compare(rhs) <= 0`.
|
| 241 |
|
| 242 |
``` cpp
|
| 243 |
template<class charT, class traits, class Allocator>
|
| 244 |
bool operator<=(const charT* lhs,
|
| 245 |
-
const basic_string<charT,traits,Allocator>& rhs)
|
| 246 |
```
|
| 247 |
|
| 248 |
*Returns:* `rhs.compare(lhs) >= 0`.
|
| 249 |
|
| 250 |
``` cpp
|
| 251 |
template<class charT, class traits, class Allocator>
|
| 252 |
bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
|
| 253 |
-
const charT* rhs)
|
| 254 |
```
|
| 255 |
|
| 256 |
*Returns:* `lhs.compare(rhs) <= 0`.
|
| 257 |
|
| 258 |
#### `operator>=` <a id="string::op>=">[[string::op>=]]</a>
|
|
@@ -266,32 +266,32 @@ template<class charT, class traits, class Allocator>
|
|
| 266 |
*Returns:* `lhs.compare(rhs) >= 0`.
|
| 267 |
|
| 268 |
``` cpp
|
| 269 |
template<class charT, class traits, class Allocator>
|
| 270 |
bool operator>=(const charT* lhs,
|
| 271 |
-
const basic_string<charT,traits,Allocator>& rhs)
|
| 272 |
```
|
| 273 |
|
| 274 |
*Returns:* `rhs.compare(lhs) <= 0`.
|
| 275 |
|
| 276 |
``` cpp
|
| 277 |
template<class charT, class traits, class Allocator>
|
| 278 |
bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
|
| 279 |
-
const charT* rhs)
|
| 280 |
```
|
| 281 |
|
| 282 |
*Returns:* `lhs.compare(rhs) >= 0`.
|
| 283 |
|
| 284 |
#### `swap` <a id="string.special">[[string.special]]</a>
|
| 285 |
|
| 286 |
``` cpp
|
| 287 |
template<class charT, class traits, class Allocator>
|
| 288 |
void swap(basic_string<charT,traits,Allocator>& lhs,
|
| 289 |
-
basic_string<charT,traits,Allocator>& rhs)
|
| 290 |
```
|
| 291 |
|
| 292 |
-
*Effects:* `lhs.swap(rhs);`
|
| 293 |
|
| 294 |
#### Inserters and extractors <a id="string.io">[[string.io]]</a>
|
| 295 |
|
| 296 |
``` cpp
|
| 297 |
template<class charT, class traits, class Allocator>
|
|
@@ -329,16 +329,16 @@ template<class charT, class traits, class Allocator>
|
|
| 329 |
operator<<(basic_ostream<charT, traits>& os,
|
| 330 |
const basic_string<charT,traits,Allocator>& str);
|
| 331 |
```
|
| 332 |
|
| 333 |
*Effects:* Behaves as a formatted output
|
| 334 |
-
function ([[ostream.formatted.reqmts]])
|
| 335 |
-
|
| 336 |
-
`
|
| 337 |
-
|
| 338 |
-
`os.rdbuf()->sputn(seq, n)`, where `n` is the larger of
|
| 339 |
-
`str.size()`; then calls `os.width(0)`.
|
| 340 |
|
| 341 |
*Returns:* `os`
|
| 342 |
|
| 343 |
``` cpp
|
| 344 |
template<class charT, class traits, class Allocator>
|
|
|
|
| 130 |
*Returns:* `lhs.compare(rhs) == 0`.
|
| 131 |
|
| 132 |
``` cpp
|
| 133 |
template<class charT, class traits, class Allocator>
|
| 134 |
bool operator==(const charT* lhs,
|
| 135 |
+
const basic_string<charT,traits,Allocator>& rhs);
|
| 136 |
```
|
| 137 |
|
| 138 |
*Returns:* `rhs == lhs`.
|
| 139 |
|
| 140 |
``` cpp
|
| 141 |
template<class charT, class traits, class Allocator>
|
| 142 |
bool operator==(const basic_string<charT,traits,Allocator>& lhs,
|
| 143 |
+
const charT* rhs);
|
| 144 |
```
|
| 145 |
|
| 146 |
*Requires:* `rhs` points to an array of at least
|
| 147 |
`traits::length(rhs) + 1` elements of `charT`.
|
| 148 |
|
|
|
|
| 159 |
*Returns:* `!(lhs == rhs)`.
|
| 160 |
|
| 161 |
``` cpp
|
| 162 |
template<class charT, class traits, class Allocator>
|
| 163 |
bool operator!=(const charT* lhs,
|
| 164 |
+
const basic_string<charT,traits,Allocator>& rhs);
|
| 165 |
```
|
| 166 |
|
| 167 |
*Returns:* `rhs != lhs`.
|
| 168 |
|
| 169 |
``` cpp
|
| 170 |
template<class charT, class traits, class Allocator>
|
| 171 |
bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
|
| 172 |
+
const charT* rhs);
|
| 173 |
```
|
| 174 |
|
| 175 |
*Requires:* `rhs` points to an array of at least
|
| 176 |
`traits::length(rhs) + 1` elements of `charT`.
|
| 177 |
|
|
|
|
| 188 |
*Returns:* `lhs.compare(rhs) < 0`.
|
| 189 |
|
| 190 |
``` cpp
|
| 191 |
template<class charT, class traits, class Allocator>
|
| 192 |
bool operator< (const charT* lhs,
|
| 193 |
+
const basic_string<charT,traits,Allocator>& rhs);
|
| 194 |
```
|
| 195 |
|
| 196 |
*Returns:* `rhs.compare(lhs) > 0`.
|
| 197 |
|
| 198 |
``` cpp
|
| 199 |
template<class charT, class traits, class Allocator>
|
| 200 |
bool operator< (const basic_string<charT,traits,Allocator>& lhs,
|
| 201 |
+
const charT* rhs);
|
| 202 |
```
|
| 203 |
|
| 204 |
*Returns:* `lhs.compare(rhs) < 0`.
|
| 205 |
|
| 206 |
#### `operator>` <a id="string::op>">[[string::op>]]</a>
|
|
|
|
| 214 |
*Returns:* `lhs.compare(rhs) > 0`.
|
| 215 |
|
| 216 |
``` cpp
|
| 217 |
template<class charT, class traits, class Allocator>
|
| 218 |
bool operator> (const charT* lhs,
|
| 219 |
+
const basic_string<charT,traits,Allocator>& rhs);
|
| 220 |
```
|
| 221 |
|
| 222 |
*Returns:* `rhs.compare(lhs) < 0`.
|
| 223 |
|
| 224 |
``` cpp
|
| 225 |
template<class charT, class traits, class Allocator>
|
| 226 |
bool operator> (const basic_string<charT,traits,Allocator>& lhs,
|
| 227 |
+
const charT* rhs);
|
| 228 |
```
|
| 229 |
|
| 230 |
*Returns:* `lhs.compare(rhs) > 0`.
|
| 231 |
|
| 232 |
#### `operator<=` <a id="string::op<=">[[string::op<=]]</a>
|
|
|
|
| 240 |
*Returns:* `lhs.compare(rhs) <= 0`.
|
| 241 |
|
| 242 |
``` cpp
|
| 243 |
template<class charT, class traits, class Allocator>
|
| 244 |
bool operator<=(const charT* lhs,
|
| 245 |
+
const basic_string<charT,traits,Allocator>& rhs);
|
| 246 |
```
|
| 247 |
|
| 248 |
*Returns:* `rhs.compare(lhs) >= 0`.
|
| 249 |
|
| 250 |
``` cpp
|
| 251 |
template<class charT, class traits, class Allocator>
|
| 252 |
bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
|
| 253 |
+
const charT* rhs);
|
| 254 |
```
|
| 255 |
|
| 256 |
*Returns:* `lhs.compare(rhs) <= 0`.
|
| 257 |
|
| 258 |
#### `operator>=` <a id="string::op>=">[[string::op>=]]</a>
|
|
|
|
| 266 |
*Returns:* `lhs.compare(rhs) >= 0`.
|
| 267 |
|
| 268 |
``` cpp
|
| 269 |
template<class charT, class traits, class Allocator>
|
| 270 |
bool operator>=(const charT* lhs,
|
| 271 |
+
const basic_string<charT,traits,Allocator>& rhs);
|
| 272 |
```
|
| 273 |
|
| 274 |
*Returns:* `rhs.compare(lhs) <= 0`.
|
| 275 |
|
| 276 |
``` cpp
|
| 277 |
template<class charT, class traits, class Allocator>
|
| 278 |
bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
|
| 279 |
+
const charT* rhs);
|
| 280 |
```
|
| 281 |
|
| 282 |
*Returns:* `lhs.compare(rhs) >= 0`.
|
| 283 |
|
| 284 |
#### `swap` <a id="string.special">[[string.special]]</a>
|
| 285 |
|
| 286 |
``` cpp
|
| 287 |
template<class charT, class traits, class Allocator>
|
| 288 |
void swap(basic_string<charT,traits,Allocator>& lhs,
|
| 289 |
+
basic_string<charT,traits,Allocator>& rhs);
|
| 290 |
```
|
| 291 |
|
| 292 |
+
*Effects:* Equivalent to `lhs.swap(rhs);`
|
| 293 |
|
| 294 |
#### Inserters and extractors <a id="string.io">[[string.io]]</a>
|
| 295 |
|
| 296 |
``` cpp
|
| 297 |
template<class charT, class traits, class Allocator>
|
|
|
|
| 329 |
operator<<(basic_ostream<charT, traits>& os,
|
| 330 |
const basic_string<charT,traits,Allocator>& str);
|
| 331 |
```
|
| 332 |
|
| 333 |
*Effects:* Behaves as a formatted output
|
| 334 |
+
function ([[ostream.formatted.reqmts]]) of `os`. Forms a character
|
| 335 |
+
sequence `seq`, initially consisting of the elements defined by the
|
| 336 |
+
range \[`str.begin(), str.end()`). Determines padding for `seq` as
|
| 337 |
+
described in [[ostream.formatted.reqmts]]. Then inserts `seq` as if by
|
| 338 |
+
calling `os.rdbuf()->sputn(seq, n)`, where `n` is the larger of
|
| 339 |
+
`os.width()` and `str.size()`; then calls `os.width(0)`.
|
| 340 |
|
| 341 |
*Returns:* `os`
|
| 342 |
|
| 343 |
``` cpp
|
| 344 |
template<class charT, class traits, class Allocator>
|