Differences From Artifact [9c8e6d80a9]:
- File src/OFMutableString_UTF8.m — part of check-in [3b97fc3cd9] at 2014-01-04 00:24:08 on branch trunk — Update copyright. (user: js, size: 19890) [annotate] [blame] [check-ins using]
To Artifact [c7dede3563]:
- File
src/OFMutableString_UTF8.m
— part of check-in
[9da9b2b64c]
at
2014-04-14 00:45:58
on branch trunk
— Coding style
No functional change intended. (user: js, size: 19913) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
272 273 274 275 276 277 278 | } - (void)appendUTF8String: (const char*)UTF8String { size_t UTF8StringLength = strlen(UTF8String); size_t length; | | > | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | } - (void)appendUTF8String: (const char*)UTF8String { size_t UTF8StringLength = strlen(UTF8String); size_t length; if (UTF8StringLength >= 3 && memcmp(UTF8String, "\xEF\xBB\xBF", 3) == 0) { UTF8String += 3; UTF8StringLength -= 3; } switch (of_string_utf8_check(UTF8String, UTF8StringLength, &length)) { case 1: _s->isUTF8 = true; |
︙ | ︙ | |||
301 302 303 304 305 306 307 | } - (void)appendUTF8String: (const char*)UTF8String length: (size_t)UTF8StringLength { size_t length; | | > | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | } - (void)appendUTF8String: (const char*)UTF8String length: (size_t)UTF8StringLength { size_t length; if (UTF8StringLength >= 3 && memcmp(UTF8String, "\xEF\xBB\xBF", 3) == 0) { UTF8String += 3; UTF8StringLength -= 3; } switch (of_string_utf8_check(UTF8String, UTF8StringLength, &length)) { case 1: _s->isUTF8 = true; |
︙ | ︙ | |||
671 672 673 674 675 676 677 | newCString = NULL; newCStringLength = 0; newLength = _s->length; last = 0; for (i = range.location; i <= range.length - searchLength; i++) { | | | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 | newCString = NULL; newCStringLength = 0; newLength = _s->length; last = 0; for (i = range.location; i <= range.length - searchLength; i++) { if (memcmp(_s->cString + i, searchString, searchLength) != 0) continue; @try { newCString = [self resizeMemory: newCString size: newCStringLength + i - last + replacementLength + 1]; |
︙ | ︙ |