我正在构建一个带有从MySQL服务器调用的许多URL的应用程序。
我需要为我的应用程序做的是获取文本字段文本并将其发送(我已经知道该怎么做),但是我需要用+(加号)替换空格
最佳答案
尝试使用字符串方法- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement;
str=[str stringByReplacingOccurrencesOfString:@" " withString:@"+"];
关于iphone - 如何在Xcode中用+替换空格,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7284380/