ObjFW  Diff

Differences From Artifact [28feddcc2f]:

To Artifact [a6d9bc8397]:


16
17
18
19
20
21
22

23
24
25
26
27
28
29
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30







+








#import "OFString.h"
#import "OFConstCString.h"
#import "OFConstWideCString.h"
#import "OFCString.h"
#import "OFWideCString.h"
#import "OFExceptions.h"
#import "OFMacros.h"

@implementation OFString
+ newAsConstCString: (const char*)str
{
	return [[OFConstCString alloc] initAsConstCString: str];
}

40
41
42
43
44
45
46
47
48
49

50
51
52
53
54
55
56

57
58
59
60
61

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

78
79
80
81
82

83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109

110
111
41
42
43
44
45
46
47



48
49
50
51
52



53
54
55
56
57

58


59
60
61
62
63
64
65
66
67
68
69



70
71
72
73
74

75



76
77
78
79



80
81
82
83
84




85
86
87
88
89





90
91
92







-
-
-
+




-
-
-
+




-
+
-
-











-
-
-
+




-
+
-
-
-




-
-
-
+




-
-
-
-
+




-
-
-
-
-
+


+ newAsWideCString: (wchar_t*)str
{
	return [[OFWideCString alloc] initAsWideCString: str];
}

- (char*)cString
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(cString)] raise];
	return NULL;
	OF_NOT_IMPLEMENTED(NULL)
}

- (wchar_t*)wcString
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(wcString)] raise];
	return NULL;
	OF_NOT_IMPLEMENTED(NULL)
}

- (size_t)length
{
	[[OFNotImplementedException newWithObject: self
	OF_NOT_IMPLEMENTED(0)
				      andSelector: @selector(length)] raise];
	return 0;
}

- (OFString*)setTo: (OFString*)str
{
	[self free];
	self = [str clone];
	return self;
}

- (OFString*)clone
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(clone)] raise];
	return nil;
	OF_NOT_IMPLEMENTED(nil)
}

- (int)compareTo: (OFString*)str
{
	[[OFNotImplementedException newWithObject: self
	OF_NOT_IMPLEMENTED(0)
				      andSelector: @selector(compareTo:)]
	    raise];
	return 0;
}

- (OFString*)append: (OFString*)str
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(append:)] raise];
	return nil;
	OF_NOT_IMPLEMENTED(nil)
}

- (OFString*)appendCString: (const char*)str
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(appendCString:)]
	    raise];
	return nil;
	OF_NOT_IMPLEMENTED(nil)
}

- (OFString*)appendWideCString: (const wchar_t*)str
{
	[[OFNotImplementedException newWithObject: self
				      andSelector: @selector(
						       appendWideCString:)]
	    raise];
	return nil;
	OF_NOT_IMPLEMENTED(nil)
}
@end