238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
-
+
-
+
|
+ stringWithCString: (const char*)str
{
return [[[self alloc] initWithCString: str] autorelease];
}
+ stringWithCString: (const char*)str
encoding: (enum of_string_encoding)encoding
encoding: (of_string_encoding_t)encoding
{
return [[[self alloc] initWithCString: str
encoding: encoding] autorelease];
}
+ stringWithCString: (const char*)str
encoding: (enum of_string_encoding)encoding
encoding: (of_string_encoding_t)encoding
length: (size_t)len
{
return [[[self alloc] initWithCString: str
encoding: encoding
length: len] autorelease];
}
|
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
|
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
|
-
+
-
+
-
+
|
+ stringWithContentsOfFile: (OFString*)path
{
return [[[self alloc] initWithContentsOfFile: path] autorelease];
}
+ stringWithContentsOfFile: (OFString*)path
encoding: (enum of_string_encoding)encoding
encoding: (of_string_encoding_t)encoding
{
return [[[self alloc] initWithContentsOfFile: path
encoding: encoding] autorelease];
}
- initWithCString: (const char*)str
{
return [self initWithCString: str
encoding: OF_STRING_ENCODING_UTF_8
length: strlen(str)];
}
- initWithCString: (const char*)str
encoding: (enum of_string_encoding)encoding
encoding: (of_string_encoding_t)encoding
{
return [self initWithCString: str
encoding: encoding
length: strlen(str)];
}
- initWithCString: (const char*)str
encoding: (enum of_string_encoding)encoding
encoding: (of_string_encoding_t)encoding
length: (size_t)len
{
self = [super init];
@try {
size_t i, j;
const uint16_t *table;
|
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
-
+
|
- initWithContentsOfFile: (OFString*)path
{
return [self initWithContentsOfFile: path
encoding: OF_STRING_ENCODING_UTF_8];
}
- initWithContentsOfFile: (OFString*)path
encoding: (enum of_string_encoding)encoding
encoding: (of_string_encoding_t)encoding
{
self = [super init];
@try {
OFFile *file;
char *tmp;
struct stat s;
|