From bf819dd173c01508603424641c934fc6cbf16f9a Mon Sep 17 00:00:00 2001 From: Nicolas Goutaland Date: Fri, 24 Feb 2017 12:09:59 +0100 Subject: [PATCH] Fixed endsWithString method --- Classes/GON_NSString+Utils.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/GON_NSString+Utils.m b/Classes/GON_NSString+Utils.m index 559f3f9..d998d94 100644 --- a/Classes/GON_NSString+Utils.m +++ b/Classes/GON_NSString+Utils.m @@ -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 @@ -99,4 +99,4 @@ - (NSRange)range return NSMakeRange(0, self.length); } -@end \ No newline at end of file +@end