244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
string = [self resizeMemory: string
toSize: length + length_ + 1];
memcpy(string + length, string_, length_);
length += length_;
string[length] = 0;
}
- (void)appendCStringWithoutUTF8Checking: (const char*)string_
encoding: (of_string_encoding_t)encoding
length: (size_t)length_
{
if (encoding == OF_STRING_ENCODING_UTF_8)
[self appendCStringWithoutUTF8Checking: string_
length: length_];
else {
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
[self appendString: [OFString stringWithCString: string_
encoding: encoding
length: length_]];
[pool release];
}
}
- (void)appendString: (OFString*)string_
{
if (string_ == nil)
@throw [OFInvalidArgumentException newWithClass: isa
selector: _cmd];
[self appendCString: [string_ cString]];
|