gpt4 book ai didi

iphone - stringByReplacingOccurrencesOfString小写和大写的字符串Objective-C

转载 作者:行者123 更新时间:2023-12-01 18:24:18 25 4
gpt4 key购买 nike

我该如何解决这个问题?

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:@"\\'"];

关于iphone - stringByReplacingOccurrencesOfString小写和大写的字符串Objective-C,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14837602/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com