ObjFW  Diff

Differences From Artifact [922642403b]:

To Artifact [7c7b5b7fed]:


414
415
416
417
418
419
420
421

422
423
424
425
426
427


428
429
430
431
432
433
434

435
436
437
438
439
440


441
442
443
444
414
415
416
417
418
419
420

421
422
423
424
425


426
427
428
429
430
431
432
433

434
435
436
437
438


439
440
441
442
443
444







-
+




-
-
+
+






-
+




-
-
+
+




	madvise(string, len, MADV_NORMAL);

	return self;
}

- upper
{
	size_t i = length;
	char *p = string + length;

	if (is_utf8)
		@throw [OFInvalidEncodingException newWithClass: [self class]];

	while (i--)
		string[i] = toupper(string[i]);
	while (--p >= string)
		*p = toupper((int)*p);

	return self;
}

- lower
{
	size_t i = length;
	char *p = string + length;

	if (is_utf8)
		@throw [OFInvalidEncodingException newWithClass: [self class]];

	while (i--)
		string[i] = tolower(string[i]);
	while (--p >= string)
		*p = tolower((int)*p);

	return self;
}
@end