ObjFW  Diff

Differences From Artifact [f753114c1f]:

To Artifact [69097c8dd7]:


101
102
103
104
105
106
107
108

109
110
111
112
113

114
115
116
117
118
119
120
121
122

123
124
125
126
127
128
129
130
131
132

133
134
135
136
137
138
139
101
102
103
104
105
106
107

108
109
110
111
112

113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
131

132
133
134
135
136
137
138
139







-
+




-
+








-
+









-
+








	return (utf8 ? 1 : 0);
}

@implementation OFString
+ string
{
	return [[[self alloc] init] autorelease];
	return [[[OFString alloc] init] autorelease];
}

+ stringWithCString: (const char*)str
{
	return [[[self alloc] initWithCString: str] autorelease];
	return [[[OFString alloc] initWithCString: str] autorelease];
}

+ stringWithFormat: (const char*)fmt, ...
{
	id ret;
	va_list args;

	va_start(args, fmt);
	ret = [[[self alloc] initWithFormat: fmt
	ret = [[[OFString alloc] initWithFormat: fmt
			       andArguments: args] autorelease];
	va_end(args);

	return ret;
}

+ stringWithFormat: (const char*)fmt
      andArguments: (va_list)args
{
	return [[[self alloc] initWithFormat: fmt
	return [[[OFString alloc] initWithFormat: fmt
				andArguments: args] autorelease];
}

- init
{
	if ((self = [super init])) {
		length = 0;