Differences From Artifact [4a06375780]:
- File src/OFMutableString.m — part of check-in [37d2a81754] at 2017-05-07 21:25:56 on branch trunk — Use char{16,32}_t instead of of_char{16,32}_t (user: js, size: 14058) [annotate] [blame] [check-ins using]
To Artifact [f5a01a1e43]:
- File
src/OFMutableString.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 14058) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
236 237 238 239 240 241 242 | if (self == [OFMutableString class]) return (id)&placeholder; return [super alloc]; } #ifdef OF_HAVE_UNICODE_TABLES | | | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | if (self == [OFMutableString class]) return (id)&placeholder; return [super alloc]; } #ifdef OF_HAVE_UNICODE_TABLES - (void)of_convertWithWordStartTable: (const of_unichar_t *const[])startTable wordMiddleTable: (const of_unichar_t *const[])middleTable wordStartTableSize: (size_t)startTableSize wordMiddleTableSize: (size_t)middleTableSize { void *pool = objc_autoreleasePoolPush(); const of_unichar_t *characters = [self characters]; size_t length = [self length]; |
︙ | ︙ | |||
279 280 281 282 283 284 285 | break; } } objc_autoreleasePoolPop(pool); } #else | | | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | break; } } objc_autoreleasePoolPop(pool); } #else - (void)of_convertWithWordStartFunction: (char (*)(char))startFunction wordMiddleFunction: (char (*)(char))middleFunction { void *pool = objc_autoreleasePoolPush(); const of_unichar_t *characters = [self characters]; size_t length = [self length]; bool isStart = true; |
︙ | ︙ | |||
442 443 444 445 446 447 448 | atIndex: i]; } } #ifdef OF_HAVE_UNICODE_TABLES - (void)uppercase { | | | | | | | | 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 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | atIndex: i]; } } #ifdef OF_HAVE_UNICODE_TABLES - (void)uppercase { [self of_convertWithWordStartTable: of_unicode_uppercase_table wordMiddleTable: of_unicode_uppercase_table wordStartTableSize: OF_UNICODE_UPPERCASE_TABLE_SIZE wordMiddleTableSize: OF_UNICODE_UPPERCASE_TABLE_SIZE]; } - (void)lowercase { [self of_convertWithWordStartTable: of_unicode_lowercase_table wordMiddleTable: of_unicode_lowercase_table wordStartTableSize: OF_UNICODE_LOWERCASE_TABLE_SIZE wordMiddleTableSize: OF_UNICODE_LOWERCASE_TABLE_SIZE]; } - (void)capitalize { [self of_convertWithWordStartTable: of_unicode_titlecase_table wordMiddleTable: of_unicode_lowercase_table wordStartTableSize: OF_UNICODE_TITLECASE_TABLE_SIZE wordMiddleTableSize: OF_UNICODE_LOWERCASE_TABLE_SIZE]; } #else - (void)uppercase { [self of_convertWithWordStartFunction: of_ascii_toupper wordMiddleFunction: of_ascii_toupper]; } - (void)lowercase { [self of_convertWithWordStartFunction: of_ascii_tolower wordMiddleFunction: of_ascii_tolower]; } - (void)capitalize { [self of_convertWithWordStartFunction: of_ascii_toupper wordMiddleFunction: of_ascii_tolower]; } #endif - (void)insertString: (OFString *)string atIndex: (size_t)index { |
︙ | ︙ |