How do i replace spaces with +'s in Xcode

后端 未结 1 1878
梦毁少年i
梦毁少年i 2021-01-24 01:07

I am building an app with a lot of urls being called from a MySQL server.

What I need to do for my app is take the textfield text and send it (which i already know how t

相关标签:
1条回答
  • 2021-01-24 01:16

    Try with the string method - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement;

    str=[str stringByReplacingOccurrencesOfString:@" " withString:@"+"];
    
    0 讨论(0)
提交回复
热议问题