首页 > 代码库 > 判断字符串是否包含其他字符串

判断字符串是否包含其他字符串

//判断两字符串是否相等
- (BOOL)isEqualToString:(NSString *)aString;

 

//判断开头是否包含该字符串
- (BOOL)hasPrefix:(NSString *)aString;


//判断结尾是否包含该字符串
- (BOOL)hasSuffix:(NSString *)aString;


//该字符串在那个位置
- (NSRange)rangeOfString:(NSString *)aString;