Skip to content

Commit

Permalink
Renaming -countOfSubstringsWithOptions:atLeast: to -countOfSubstrings…
Browse files Browse the repository at this point in the history
…WithOptions:isAtLeast:.
  • Loading branch information
JanX2 committed Mar 27, 2012
1 parent 33c2923 commit d8f6647
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion readability/NSString+Counting.h
Expand Up @@ -12,6 +12,6 @@

- (NSUInteger)countOccurancesOfString:(NSString *)needle;
- (NSUInteger)countSubstringsWithOptions:(NSStringEnumerationOptions)opts;
- (BOOL)countOfSubstringsWithOptions:(NSStringEnumerationOptions)opts atLeast:(NSUInteger)lowerBound;
- (BOOL)countOfSubstringsWithOptions:(NSStringEnumerationOptions)opts isAtLeast:(NSUInteger)lowerBound;

@end
2 changes: 1 addition & 1 deletion readability/NSString+Counting.m
Expand Up @@ -46,7 +46,7 @@ - (NSUInteger)countSubstringsWithOptions:(NSStringEnumerationOptions)opts;
return count;
}

- (BOOL)countOfSubstringsWithOptions:(NSStringEnumerationOptions)opts atLeast:(NSUInteger)lowerBound;
- (BOOL)countOfSubstringsWithOptions:(NSStringEnumerationOptions)opts isAtLeast:(NSUInteger)lowerBound;
{
if (self.length == 0) return 0;

Expand Down
8 changes: 4 additions & 4 deletions readability/htmls.m
Expand Up @@ -98,7 +98,7 @@
void addMatch(NSMutableSet *collection, NSString *text, NSString *orig) {
text = normTitle(text);

if ((text.length >= 15) && [text countOfSubstringsWithOptions:NSStringEnumerationByWords atLeast:2]) {
if ((text.length >= 15) && [text countOfSubstringsWithOptions:NSStringEnumerationByWords isAtLeast:2]) {
NSString *textWithoutQuotes = [text stringByReplacingOccurrencesOfString:@"\"" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, text.length)];
NSString *origWithoutQuotes = [orig stringByReplacingOccurrencesOfString:@"\"" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, orig.length)];

Expand Down Expand Up @@ -201,13 +201,13 @@ void addMatch(NSMutableSet *collection, NSString *text, NSString *orig) {

NSString *titleCandidate;
if (titleCandidate = [parts objectAtIndex:0],
[titleCandidate countOfSubstringsWithOptions:NSStringEnumerationByWords atLeast:4]) {
[titleCandidate countOfSubstringsWithOptions:NSStringEnumerationByWords isAtLeast:4]) {
title = titleCandidate;
didBreak = YES;
break;
}
else if (titleCandidate = [parts lastObject],
[titleCandidate countOfSubstringsWithOptions:NSStringEnumerationByWords atLeast:4]) {
[titleCandidate countOfSubstringsWithOptions:NSStringEnumerationByWords isAtLeast:4]) {
title = titleCandidate;
didBreak = YES;
break;
Expand All @@ -223,7 +223,7 @@ void addMatch(NSMutableSet *collection, NSString *text, NSString *orig) {

NSString *titleCandidate;
if (titleCandidate = [parts lastObject],
[titleCandidate countOfSubstringsWithOptions:NSStringEnumerationByWords atLeast:4]) {
[titleCandidate countOfSubstringsWithOptions:NSStringEnumerationByWords isAtLeast:4]) {
title = [parts lastObject];
}
else {
Expand Down

0 comments on commit d8f6647

Please sign in to comment.