hey 开发者_如何学运维all i want a code the replace whitespaces by a + sign in objective-c
In case you are asking this because you need to encode URLs, use this
NSString* escapedUrlString =
  [unescapedString stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding];
If you just need space to +, use
[str stringByReplacingOccurrencesOfString:@" " withString:@"+"];
return [thatString stringByReplacingOccurrencesOfString:@" " withString:@"+"];
If your real target is to escape URL component, use the -stringByAddingPercentEscapesUsingEncoding: method instead.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论