Comparison methods in Cocoa and Cocoa Touch return a way to arrange the objects to be compared instead of simply returning a boolean value indicating whether these values โโare the same or not. There are three meanings:
NSOrderedAscending : The left operand is smaller than the right operand.NSOrderedSame : Two operands are equal.NSOrderedDescending : The left operand is larger than the right operand.
That way, your code just checks to see if the line that result points to is the ERROR line, ignoring the differences in the case (that is, "error", "eRRoR", etc., all are considered equal to "ERROR").
Darkdust
source share