ObjFW  Diff

Differences From Artifact [4f2f2b15be]:

To Artifact [a7c6aaf7d8]:


349
350
351
352
353
354
355






















356
357
358
359
360
361
362
}

- (void)lower
{
	[self _applyTable: of_unicode_lower_table
		 withSize: OF_UNICODE_LOWER_TABLE_SIZE];
}























- (void)removeCharactersFromIndex: (size_t)start
			  toIndex: (size_t)end
{
	if (isUTF8) {
		start = of_string_index_to_position(string, start, length);
		end = of_string_index_to_position(string, end, length);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
}

- (void)lower
{
	[self _applyTable: of_unicode_lower_table
		 withSize: OF_UNICODE_LOWER_TABLE_SIZE];
}

- (void)insertString: (OFString*)str
	     atIndex: (size_t)idx
{
	size_t nlen;

	if (isUTF8)
		idx = of_string_index_to_position(string, idx, length);

	if (idx > length)
		@throw [OFOutOfRangeException newWithClass: isa];

	nlen = length + [str cStringLength];
	string = [self resizeMemory: string
			     toSize: nlen + 1];

	memmove(string + idx + [str cStringLength], string + idx, length - idx);
	memcpy(string + idx, [str cString], [str cStringLength]);
	string[nlen] = '\0';

	length = nlen;
}

- (void)removeCharactersFromIndex: (size_t)start
			  toIndex: (size_t)end
{
	if (isUTF8) {
		start = of_string_index_to_position(string, start, length);
		end = of_string_index_to_position(string, end, length);