ObjFW  Diff

Differences From Artifact [38887f119f]:

To Artifact [53d2bab608]:


585
586
587
588
589
590
591



592
593
594
595
596
597
598
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601







+
+
+







							    selector: _cmd];
	}
}

- (BOOL)isEqual: (id)object
{
	OFString_UTF8 *otherString;

	if (object == self)
		return YES;

	if (![object isKindOfClass: [OFString class]])
		return NO;

	otherString = object;

	if ([otherString UTF8StringLength] != s->cStringLength ||
607
608
609
610
611
612
613



614
615
616
617
618
619
620
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626







+
+
+








- (of_comparison_result_t)compare: (id)object
{
	OFString *otherString;
	size_t otherCStringLength, minimumCStringLength;
	int compare;

	if (object == self)
		return OF_ORDERED_SAME;

	if (![object isKindOfClass: [OFString class]])
		@throw [OFInvalidArgumentException exceptionWithClass: isa
							     selector: _cmd];

	otherString = object;
	otherCStringLength = [otherString UTF8StringLength];
	minimumCStringLength = (s->cStringLength > otherCStringLength
636
637
638
639
640
641
642



643
644
645
646
647
648
649
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658







+
+
+







}

- (of_comparison_result_t)caseInsensitiveCompare: (OFString*)otherString
{
	const char *otherCString;
	size_t i, j, otherCStringLength, minimumCStringLength;
	int compare;

	if (otherString == self)
		return OF_ORDERED_SAME;

	if (![otherString isKindOfClass: [OFString class]])
		@throw [OFInvalidArgumentException exceptionWithClass: isa
							     selector: _cmd];

	otherCString = [otherString UTF8String];
	otherCStringLength = [otherString UTF8StringLength];