311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
[self appendString: [OFString stringWithUTF8String: UTF8String]];
objc_autoreleasePoolPop(pool);
}
- (void)appendUTF8String: (const char*)UTF8String
withLength: (size_t)UTF8StringLength
{
void *pool = objc_autoreleasePoolPush();
[self appendString: [OFString stringWithUTF8String: UTF8String
length: UTF8StringLength]];
objc_autoreleasePoolPop(pool);
}
- (void)appendCString: (const char*)cString
withEncoding: (of_string_encoding_t)encoding
{
void *pool = objc_autoreleasePoolPush();
[self appendString: [OFString stringWithCString: cString
encoding: encoding]];
objc_autoreleasePoolPop(pool);
}
- (void)appendCString: (const char*)cString
withEncoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
{
void *pool = objc_autoreleasePoolPush();
[self appendString: [OFString stringWithCString: cString
encoding: encoding
length: cStringLength]];
|
|
|
|
|
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
[self appendString: [OFString stringWithUTF8String: UTF8String]];
objc_autoreleasePoolPop(pool);
}
- (void)appendUTF8String: (const char*)UTF8String
length: (size_t)UTF8StringLength
{
void *pool = objc_autoreleasePoolPush();
[self appendString: [OFString stringWithUTF8String: UTF8String
length: UTF8StringLength]];
objc_autoreleasePoolPop(pool);
}
- (void)appendCString: (const char*)cString
encoding: (of_string_encoding_t)encoding
{
void *pool = objc_autoreleasePoolPush();
[self appendString: [OFString stringWithCString: cString
encoding: encoding]];
objc_autoreleasePoolPop(pool);
}
- (void)appendCString: (const char*)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
{
void *pool = objc_autoreleasePoolPush();
[self appendString: [OFString stringWithCString: cString
encoding: encoding
length: cStringLength]];
|
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
|
- (void)appendFormat: (OFConstantString*)format, ...
{
va_list arguments;
va_start(arguments, format);
[self appendFormat: format
withArguments: arguments];
va_end(arguments);
}
- (void)appendFormat: (OFConstantString*)format
withArguments: (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
withLength: UTF8StringLength];
} @finally {
free(UTF8String);
}
}
- (void)prependString: (OFString*)string
{
|
|
|
|
|
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
|
- (void)appendFormat: (OFConstantString*)format, ...
{
va_list arguments;
va_start(arguments, format);
[self appendFormat: format
arguments: arguments];
va_end(arguments);
}
- (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)prependString: (OFString*)string
{
|