Overview
Comment: | Fix a few forgotten renames. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c47538ce8e46a6ad92d0db4aad0ce9cf |
User & Date: | js on 2012-10-16 14:49:31 |
Other Links: | manifest | tags |
Context
2012-10-16
| ||
14:49 | OFConstantString: Add a few missing new methods. check-in: e49548ce0f user: js tags: trunk | |
14:49 | Fix a few forgotten renames. check-in: c47538ce8e user: js tags: trunk | |
14:47 | A few more API improvements. check-in: fcaa549324 user: js tags: trunk | |
Changes
Modified src/OFMutableString_UTF8.m from [3b96c919ea] to [a8539dd005].
︙ | ︙ | |||
294 295 296 297 298 299 300 | memcpy(s->cString + s->cStringLength, UTF8String, UTF8StringLength + 1); s->cStringLength += UTF8StringLength; s->length += length; } - (void)appendUTF8String: (const char*)UTF8String | | | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | memcpy(s->cString + s->cStringLength, UTF8String, UTF8StringLength + 1); s->cStringLength += UTF8StringLength; s->length += length; } - (void)appendUTF8String: (const char*)UTF8String length: (size_t)UTF8StringLength { size_t length; if (UTF8StringLength >= 3 && !memcmp(UTF8String, "\xEF\xBB\xBF", 3)) { UTF8String += 3; UTF8StringLength -= 3; } |
︙ | ︙ | |||
338 339 340 341 342 343 344 | - (void)appendCString: (const char*)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength { if (encoding == OF_STRING_ENCODING_UTF_8) [self appendUTF8String: cString | | | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - (void)appendCString: (const char*)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength { if (encoding == OF_STRING_ENCODING_UTF_8) [self appendUTF8String: cString length: cStringLength]; else { void *pool = objc_autoreleasePoolPush(); [self appendString: [OFString stringWithCString: cString encoding: encoding length: cStringLength]]; objc_autoreleasePoolPop(pool); |
︙ | ︙ | |||
381 382 383 384 385 386 387 | if (((OFString_UTF8*)string)->s->isUTF8) s->isUTF8 = YES; } else s->isUTF8 = YES; } - (void)appendFormat: (OFConstantString*)format | | | | 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | if (((OFString_UTF8*)string)->s->isUTF8) s->isUTF8 = YES; } else s->isUTF8 = YES; } - (void)appendFormat: (OFConstantString*)format arguments: (va_list)arguments { char *UTF8String; int UTF8StringLength; if (format == nil) @throw [OFInvalidArgumentException exceptionWithClass: [self class] selector: _cmd]; if ((UTF8StringLength = of_vasprintf(&UTF8String, [format UTF8String], arguments)) == -1) @throw [OFInvalidFormatException exceptionWithClass: [self class]]; @try { [self appendUTF8String: UTF8String length: UTF8StringLength]; } @finally { free(UTF8String); } } - (void)reverse { |
︙ | ︙ |