gpt4 book ai didi

iphone - Objective-C 查找和替换字符串问题

转载 作者:太空狗 更新时间:2023-10-30 03:46:42 26 4
gpt4 key购买 nike

我正在尝试对要执行的字符串进行查找和替换

tempString =[tempString stringByReplacingOccurrencesOfString:@""" withString:@"""];

但它不适用于“”,无论如何我可以将引号换行以便我可以使用它吗?

最佳答案

您是否在第二个 " 之前尝试过反斜杠?A la:

tempString = [tempString stringByReplacingOccurrencesOfString:@""" withString:@"\""];

关于iphone - Objective-C 查找和替换字符串问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4432589/

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