Remove double quotes from NSString

前端 未结 6 547
长情又很酷
长情又很酷 2020-12-18 08:28

How do I remove double quotes from an NSString. Example:

//theMutableString: \"Hello World\"

[theMutableString replaceOccurrencesOfString:@\"\\\"\" withStr         


        
6条回答
  •  天命终不由人
    2020-12-18 09:16

    You can use

    string = [string stringByReplacingOccurrencesOfString:@"\"" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0, [string length])];
    

提交回复
热议问题