我该如何解决这个问题?

NSString * vendorName=@"can't event";
vendorName= [[[vendorName stringByReplacingOccurrencesOfString:@" " withString:@"%20"]    stringByReplacingOccurrencesOfString:@"'" withString:@"\\\'"] capitalizedString];

我收到的输出是无法参加

但是,我需要的结果不能触发

谢谢

最佳答案

NSString *vendorName=@"can't event";
vendorName= [[[vendorName capitalizedString] stringByReplacingOccurrencesOfString:@" " withString:@"%20"] stringByReplacingOccurrencesOfString:@"'" withString:@"\\'"];

08-26 04:02