NSString*string =@"阴转小区9℃";
NSRangerange ;
range = [stringrangeOfString:@"℃"];
if(range.location!=NSNotFound) {
NSString* str = [stringsubstringToIndex:range.location];
NSLog(@"%@",str);
}else{
NSLog(@"NO FOUND");
}
NSString*string =@"阴转小区9℃";
NSRangerange ;
range = [stringrangeOfString:@"℃"];
if(range.location!=NSNotFound) {
NSString* str = [stringsubstringToIndex:range.location];
NSLog(@"%@",str);
}else{
NSLog(@"NO FOUND");
}