ObjFW  Diff

Differences From Artifact [e137055b69]:

To Artifact [693bddf4d9]:


37
38
39
40
41
42
43



44
45
46
47
48
49
50

	if (string != NULL)
		[self freeMemory: string];

	len = strlen(str);

	switch (of_string_check_utf8(str, len)) {



	case 1:
		is_utf8 = YES;
		break;
	case -1:
		string = NULL;
		length = 0;
		is_utf8 = NO;







>
>
>







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

	if (string != NULL)
		[self freeMemory: string];

	len = strlen(str);

	switch (of_string_check_utf8(str, len)) {
	case 0:
		is_utf8 = NO;
		break;
	case 1:
		is_utf8 = YES;
		break;
	case -1:
		string = NULL;
		length = 0;
		is_utf8 = NO;
130
131
132
133
134
135
136
137





138
139
140
141
142
143
144
	string[length] = 0;

	return self;
}

- appendString: (OFString*)str
{
	return [self appendCStringWithoutUTF8Checking: [str cString]];





}

- appendWithFormat: (OFString*)fmt, ...
{
	id ret;
	va_list args;








|
>
>
>
>
>







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
	string[length] = 0;

	return self;
}

- appendString: (OFString*)str
{
	[self appendCStringWithoutUTF8Checking: [str cString]];

	if (str->is_utf8)
		is_utf8 = YES;

	return self;
}

- appendWithFormat: (OFString*)fmt, ...
{
	id ret;
	va_list args;