Differences From Artifact [e77a1233fc]:
- File src/OFMutableString.m — part of check-in [917ce5754c] at 2012-12-22 15:37:19 on branch trunk — Add -[doesNotRecognizeSelector:]. (user: js, size: 12462) [annotate] [blame] [check-ins using]
To Artifact [b484829d75]:
- File
src/OFMutableString.m
— part of check-in
[9e8c825616]
at
2012-12-29 14:31:10
on branch trunk
— OFMutableString: Implement more methods.
The only method that needs to be implemented by a subclass now is
-[replaceCharactersInRange:withString:]. (user: js, size: 12655) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
297 298 299 300 301 302 303 | objc_autoreleasePoolPop(pool); } - (void)setCharacter: (of_unichar_t)character atIndex: (size_t)index { | > > | > > | > > > > | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | objc_autoreleasePoolPop(pool); } - (void)setCharacter: (of_unichar_t)character atIndex: (size_t)index { void *pool = objc_autoreleasePoolPush(); OFString *string; string = [OFString stringWithUnicodeString: &character length: 1]; [self replaceCharactersInRange: of_range(index, 1) withString: string]; objc_autoreleasePoolPop(pool); } - (void)appendUTF8String: (const char*)UTF8String { void *pool = objc_autoreleasePoolPush(); [self appendString: [OFString stringWithUTF8String: UTF8String]]; |
︙ | ︙ | |||
431 432 433 434 435 436 437 | wordStartTableSize: OF_UNICODE_TITLECASE_TABLE_SIZE wordMiddleTableSize: OF_UNICODE_LOWERCASE_TABLE_SIZE]; } - (void)insertString: (OFString*)string atIndex: (size_t)index { | | | | | | | < | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | wordStartTableSize: OF_UNICODE_TITLECASE_TABLE_SIZE wordMiddleTableSize: OF_UNICODE_LOWERCASE_TABLE_SIZE]; } - (void)insertString: (OFString*)string atIndex: (size_t)index { [self replaceCharactersInRange: of_range(index, 0) withString: string]; } - (void)deleteCharactersInRange: (of_range_t)range { [self replaceCharactersInRange: range withString: @""]; } - (void)replaceCharactersInRange: (of_range_t)range withString: (OFString*)replacement { [self doesNotRecognizeSelector: _cmd]; abort(); } - (void)replaceOccurrencesOfString: (OFString*)string withString: (OFString*)replacement { [self replaceOccurrencesOfString: string withString: replacement |
︙ | ︙ |