20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#import "OFCString.h"
#import "OFWideCString.h"
#import "OFExceptions.h"
@implementation OFString
+ newAsConstCString: (const char*)str
{
return [[OFConstCString alloc] initWithConstCString: str];
}
+ newAsConstWideCString: (const wchar_t*)str
{
return [[OFConstWideCString alloc] initWithConstWideCString: str];
}
+ newAsCString: (char*)str
{
return [[OFCString alloc] initWithCString: str];
}
+ newAsWideCString: (wchar_t*)str
{
return [[OFWideCString alloc] initWithWideCString: str];
}
- (char*)cString
{
[[OFNotImplementedException newWithObject: self
andSelector: @selector(cString)] raise];
return NULL;
|
|
|
|
|
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#import "OFCString.h"
#import "OFWideCString.h"
#import "OFExceptions.h"
@implementation OFString
+ newAsConstCString: (const char*)str
{
return [[OFConstCString alloc] initAsConstCString: str];
}
+ newAsConstWideCString: (const wchar_t*)str
{
return [[OFConstWideCString alloc] initAsConstWideCString: str];
}
+ newAsCString: (char*)str
{
return [[OFCString alloc] initAsCString: str];
}
+ newAsWideCString: (wchar_t*)str
{
return [[OFWideCString alloc] initAsWideCString: str];
}
- (char*)cString
{
[[OFNotImplementedException newWithObject: self
andSelector: @selector(cString)] raise];
return NULL;
|