Differences From Artifact [3c8f4c2bc5]:
- File
src/OFMutableString.m
— part of check-in
[36e8a94f34]
at
2011-07-09 14:45:44
on branch trunk
— Cache the length of a string.
Also removes -[appendCStringWithoutUTF8Checking:] as it is dangerous and
not compatible with this optimization. (user: js, size: 16105) [annotate] [blame] [check-ins using]
To Artifact [f5b0d569c9]:
- File src/OFMutableString.m — part of check-in [f977192a23] at 2011-08-04 16:48:32 on branch trunk — Get rid of -[*FromIndex:toIndex:]. (user: js, size: 15837) [annotate] [blame] [check-ins using]
︙ | |||
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; } |
︙ |