NSString(NSString_PatternMatching)
@interface NSString (NSString_PatternMatching)
Category of regex string and check if some string match the regex
-
Regex string that check if some string match the regex
Declaration
Objective-C
- (BOOL)matchesString:(NSString *)string;
Swift
func matchesString(_ string: String!) -> Bool
Parameters
string
Other string to be matches to the regex string
Return Value
true
if it is match andfalse
otherwise -
Regex string that check if some string match the regex with Case Insensitive option
Declaration
Objective-C
- (BOOL)matchesStringCaseInsensitive:(NSString *)string;
Swift
func matchesStringCaseInsensitive(_ string: String!) -> Bool
Parameters
string
Other string to be matches to the regex string
Return Value
true
if it is match andfalse
otherwise