标签:io ar sp on art log bs ef as
例如:
NSString *string = @"abavavasdsvx,as.dsf/,.[abcdefghijklmn]dgdfg";
NSRange start = [string rangeOfString:@"["];
NSRange end = [string rangeOfString:@"]"];
NSString *sub = [string substringWithRange:NSMakeRange(start.location, end.location-start.location+1)];
NSLog(@"sub=%@",sub);
控制台就输出:[abcdefghijklmn]
标签:io ar sp on art log bs ef as
原文地址:http://www.cnblogs.com/volleymark/p/4046379.html