@@ -1795,7 +1795,7 @@ - (NSArray *)_localizedUndoStrings {
1795
1795
NSString *canonical = [NSLocale canonicalLocaleIdentifierFromString: preferred];
1796
1796
if (canonical.length == 0 ) canonical = @" en" ;
1797
1797
strings = dic[canonical];
1798
- if (!strings && [canonical containsString :@" _" ]) {
1798
+ if (!strings && ( [canonical rangeOfString :@" _" ]. location != NSNotFound ) ) {
1799
1799
NSString *prefix = [canonical componentsSeparatedByString: @" _" ].firstObject ;
1800
1800
if (prefix.length ) strings = dic[prefix];
1801
1801
}
@@ -3718,7 +3718,7 @@ - (void)setFontName_:(NSString *)fontName {
3718
3718
} else if ([fontName.lowercaseString isEqualToString: @" system bold" ]) {
3719
3719
font = [UIFont boldSystemFontOfSize: font.pointSize];
3720
3720
} else {
3721
- if ([self fontIsBold_: font] && ! [fontName.lowercaseString containsString :@" bold" ]) {
3721
+ if ([self fontIsBold_: font] && ( [fontName.lowercaseString rangeOfString :@" bold" ]. location == NSNotFound ) ) {
3722
3722
font = [UIFont fontWithName: fontName size: font.pointSize];
3723
3723
font = [self boldFont_: font];
3724
3724
} else {
@@ -3758,7 +3758,7 @@ - (void)setPlaceholderFontName_:(NSString *)fontName {
3758
3758
} else if ([fontName.lowercaseString isEqualToString: @" system bold" ]) {
3759
3759
font = [UIFont boldSystemFontOfSize: font.pointSize];
3760
3760
} else {
3761
- if ([self fontIsBold_: font] && ! [fontName.lowercaseString containsString :@" bold" ]) {
3761
+ if ([self fontIsBold_: font] && ( [fontName.lowercaseString rangeOfString :@" bold" ]. location == NSNotFound ) ) {
3762
3762
font = [UIFont fontWithName: fontName size: font.pointSize];
3763
3763
font = [self boldFont_: font];
3764
3764
} else {
0 commit comments