Overview
Comment: | Get rid of -[*FromIndex:toIndex:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f977192a233e204da718f03e7f01b134 |
User & Date: | js on 2011-08-04 16:48:32 |
Other Links: | manifest | tags |
Context
2011-08-04
| ||
17:18 | Add a note about usage of super to OFMutableCArray. check-in: dc8b06a5aa user: js tags: trunk | |
16:48 | Get rid of -[*FromIndex:toIndex:]. check-in: f977192a23 user: js tags: trunk | |
2011-08-03
| ||
16:25 | Fix a few OFString tests. check-in: cc93f51348 user: js tags: trunk | |
Changes
Modified src/OFConstantString.m from [4fa86efffd] to [5745a4d78a].
︙ | |||
465 466 467 468 469 470 471 | 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | - - - - - - - - - - | { if (initialized != SIZE_MAX) [self finishInitialization]; return [super containsString: string]; } |
︙ |
Modified src/OFHTTPRequest.m from [6cdf31afd0] to [205f214213].
︙ | |||
280 281 282 283 284 285 286 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | - - + + | */ line = [sock readLine]; if (![line hasPrefix: @"HTTP/1.0 "] && ![line hasPrefix: @"HTTP/1.1 "]) @throw [OFInvalidServerReplyException newWithClass: isa]; |
︙ |
Modified src/OFMutableString.h from [903f2cd12d] to [7e1d229b63].
︙ | |||
118 119 120 121 122 123 124 | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - - - - - - - - - - - - - - - - - - - - - - | */ - (void)insertString: (OFString*)string atIndex: (size_t)index; /** * \brief Deletes the characters at the specified range. * |
︙ |
Modified src/OFMutableString.m from [3c8f4c2bc5] to [f5b0d569c9].
︙ | |||
429 430 431 432 433 434 435 | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - - - + + + + + | string->s->cStringLength); s->cString[newCStringLength] = '\0'; s->cStringLength = newCStringLength; s->length += string->s->length; } |
︙ | |||
461 462 463 464 465 466 467 | 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | - - - - - - - + - - + + + | toSize: s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ [e release]; } } |
︙ | |||
504 505 506 507 508 509 510 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | - - - - - - - - | replacement->s->cStringLength); s->cString[newCStringLength] = '\0'; s->cStringLength = newCStringLength; s->length = newLength; } |
︙ |
Modified src/OFString.h from [5a32f0ead2] to [f186440ce9].
︙ | |||
570 571 572 573 574 575 576 | 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | - - - - - - - - - | /** * \param string The string to search * \return Whether the string contains the specified string */ - (BOOL)containsString: (OFString*)string; |
︙ |
Modified src/OFString.m from [9e62f802e4] to [e16259c02d].
︙ | |||
1394 1395 1396 1397 1398 1399 1400 | 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 | - + - - + - - + - - - - - - | for (i = 0; i <= s->cStringLength - cStringLength; i++) if (!memcmp(s->cString + i, cString, cStringLength)) return YES; return NO; } |
︙ |
Modified src/OFXMLParser.m from [b84b15abc4] to [a92b6c9809].
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + - | withString: @"\n"]; [ret replaceOccurrencesOfString: @"\r" withString: @"\n"]; if (cut > 0) { size_t length = [ret length]; |
︙ | |||
395 396 397 398 399 400 401 | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | - + - | char piDelimiter = 0; if (!acceptProlog) return NO; acceptProlog = NO; |
︙ |
Modified tests/OFStringTests.m from [eb8775f0d6] to [570caa0b7f].
︙ | |||
216 217 218 219 220 221 222 | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | - - + + - - + - - + - - + - - + - - + - - - - - - | TEST(@"-[indexOfLastOccurrenceOfString:]", [@"πΓΆΓΆ" indexOfLastOccurrenceOfString: @"ΓΆΓΆ"] == 1 && [@"πΓΆΓΆ" indexOfLastOccurrenceOfString: @"ΓΆ"] == 2 && [@"πΓΆΓΆ" indexOfLastOccurrenceOfString: @"π"] == 0 && [@"πΓΆΓΆ" indexOfLastOccurrenceOfString: @"x"] == OF_INVALID_INDEX) |
︙ | |||
410 411 412 413 414 415 416 | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - + - + - - + - - + - + - - + - + - - + - - + + - + - - - - + + + - - + - - + - - - - - - + - - + - + - - + - - + - - - - - - | EXPECT_EXCEPTION(@"Detect invalid encoding in -[stringByURLDecoding] " @"#1", OFInvalidEncodingException, [@"foo%bar" stringByURLDecoding]) EXPECT_EXCEPTION(@"Detect invalid encoding in -[stringByURLDecoding] " @"#2", OFInvalidEncodingException, [@"foo%FFbar" stringByURLDecoding]) |
︙ |