标签:字符串 空格 换行
+ (NSString *)handleSpaceAndEnterElementWithString:(NSString *)sourceStr
{
NSString *realSre = [sourceStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSString *realSre1 = [realSre stringByReplacingOccurrencesOfString:@"\r" withString:@""];
NSString *realSre2 = [realSre1 stringByReplacingOccurrencesOfString:@"\n" withString:@""];
NSString *realSre3 = [realSre2 stringByReplacingOccurrencesOfString:@" " withString:@""];
NSString *realSre4 = [realSre3 stringByReplacingOccurrencesOfString:@"(" withString:@""];
NSString *realSre5 = [realSre4 stringByReplacingOccurrencesOfString:@")" withString:@""];
NSArray *array = [realSre5 componentsSeparatedByString:@","];
return [array objectAtIndex:0];
}
标签:字符串 空格 换行
原文地址:http://blog.csdn.net/zh_2608/article/details/42741727