1.C风格和OC风格字符串的转换 stringWithUTF8String/UTF8String
2.NSString字符串的声明
3.字符串格式化 stringWithFormat
4.NSString字符串的拼接 stringByAppendingString
5.字母大小写转换 lowercaseString/uppercaseString
6.判断字符串是否包含前缀/后缀 hasPrefix/hasSuffix
7.字符串相同的判断 isEqualToString
8.字符串的分割 componentsSeparatedByString
9.字符串的截取 substringWithRange/substringFromIndex/substringToIndex
10.字符串中查找指定字符串内容(获得NSRange对象) rangeOfString
11.字符串的替代 stringByReplacingCharactersInRange/stringByReplacingOccurrencesOfString
12.URL路径和本地文件路径的转换 URLWithString/fileURLWithPath
13.NSMutableString可变字符串(NSMutableString是NSString的子类)
13-1 NSMutableString的初始化:
NSMutableString *str = [[NSMutableString alloc] init];//初始化
NSMutableString *str_1 = [[NSMutableString alloc] initWithCapacity: 12];//初始化得到长度为12的可变字符串
[str setString:@"Hello"];//赋值
13-2 替换字符串
NSRange range = [str rangeOfString:@"Hello"];
[str replaceCharactersInRange:range withString:@"Hi"];
13-3插入字符串
[str insertString:@"IOS" atIndex:2];
13-4 删除字符串
NSRange range = [str rangeOfString:@"IOS"];
[str deleteCharactersInRange:range];
13-5 追加字符串
[str appendString:@"IOS"];
[str appendFormat:@"%d", 200];