Skip to content

Commit

Permalink
Fixed endsWithString method
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasgoutaland authored Feb 24, 2017
1 parent 7a15b98 commit bf819dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/GON_NSString+Utils.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ - (BOOL)startsWithString:(NSString*)string

- (BOOL)endsWithString:(NSString*)string
{
return [self rangeOfString:string].location == (self.length - string.length);
return [self rangeOfString:string options:NSBackwardsSearch].location == (self.length - string.length);
}

- (NSString *)stringByTrimmingCharacters
Expand Down Expand Up @@ -99,4 +99,4 @@ - (NSRange)range
return NSMakeRange(0, self.length);
}

@end
@end

0 comments on commit bf819dd

Please sign in to comment.