Overview
Comment: | Rename -[deleteLeadingAndTrailingWhitespaces]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7c66260ead45212ff8d5adbcf3f05892 |
User & Date: | js on 2011-07-08 20:13:39 |
Other Links: | manifest | tags |
Context
2011-07-08
| ||
21:08 | Optimize +[stringWithString:] and -[appendString:]. check-in: e250800382 user: js tags: trunk | |
20:13 | Rename -[deleteLeadingAndTrailingWhitespaces]. check-in: 7c66260ead user: js tags: trunk | |
20:07 | Rename OF_PATH_DELIM to OF_PATH_DELIMITER. check-in: 7d9efc3924 user: js tags: trunk | |
Changes
Modified src/OFConstantString.m from [d4339ab533] to [c1cbc7f938].
︙ | |||
530 531 532 533 534 535 536 | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | - + - + | { if (initialized != SIZE_MAX) [self completeInitialization]; return [super stringByDeletingTrailingWhitespaces]; } |
︙ |
Modified src/OFMutableString.h from [f563238c97] to [b015e271e1].
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 | - + | * \brief Deletes all whitespaces at the end of the string. */ - (void)deleteTrailingWhitespaces; /** * \brief Deletes all whitespaces at the beginning and the end of the string. */ |
Modified src/OFMutableString.m from [34b8bce34b] to [736e731460].
︙ | |||
598 599 600 601 602 603 604 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 | - + | toSize: s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ [e release]; } } |
︙ |
Modified src/OFString.h from [4d41d466d8] to [3fb5b4e15d].
︙ | |||
622 623 624 625 626 627 628 | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | - + | /** * Creates a new string by deleting leading and trailing whitespaces. * * \return A new autoreleased OFString with leading and trailing whitespaces * deleted */ |
︙ |
Modified src/OFString.m from [92607cf374] to [39b88703df].
︙ | |||
1513 1514 1515 1516 1517 1518 1519 | 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 | - + - + | * to be OFString*, so it can't be modified anyway. But not swizzling it * would create a real copy each time -[copy] is called. */ new->isa = [OFString class]; return new; } |
︙ |
Modified src/OFXMLParser.m from [c97fda3f99] to [d41280c3bf].
︙ | |||
388 389 390 391 392 393 394 | 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | - + | if (!acceptProlog) return NO; acceptProlog = NO; pi = [pi substringFromIndex: 3 toIndex: [pi length]]; |
︙ | |||
766 767 768 769 770 771 772 | 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | - + | if (buffer[*i] != '=') return; if ((length = *i - *last) > 0) cache_append(cache, buffer + *last, encoding, length); |
︙ |
Modified tests/OFStringTests.m from [b6b68a3700] to [5ba4a302f9].
︙ | |||
474 475 476 477 478 479 480 | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + - - + - + - | TEST(@"-[deleteTrailingWhitespaces]", (s[0] = [OFMutableString stringWithString: whitespace[0]]) && R([s[0] deleteTrailingWhitespaces]) && [s[0] isEqual: @" \r \t\n\t \tasd"] && (s[0] = [OFMutableString stringWithString: whitespace[1]]) && R([s[0] deleteTrailingWhitespaces]) && [s[0] isEqual: @""]) |
︙ |