Skip to content

Commit

Permalink
implementing CPString compare: so that sorting will work with default…
Browse files Browse the repository at this point in the history
… selector
  • Loading branch information
nicktak authored and Ross Boucher committed Oct 17, 2008
1 parent 0ac0a84 commit fc9e5b3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Foundation/CPString.j
Expand Up @@ -404,14 +404,25 @@ var CPStringHashes = new objj_dictionary();

// Identifying and comparing strings

/*
Compares the receiver to the specified string.
@param aString the string with which to compare
@return the result of the comparison
*/
- (CPComparisonResult)compare:(CPString)aString
{
return [self compare:aString options:nil];
}


/*
Compares the receiver to the specified string.
@param aString the string with which to compare
@return the result of the comparison
*/
- (CPComparisonResult)caseInsensitiveCompare:(CPString)aString
{
return [self compare:aString options:CPCaseInsensitiveSearch]
return [self compare:aString options:CPCaseInsensitiveSearch];
}

/*
Expand Down

0 comments on commit fc9e5b3

Please sign in to comment.