Remove double quotes from NSString

前端 未结 6 554
长情又很酷
长情又很酷 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:31

    I works perfectly on my end (I copy-pasted your replace line), with both NSMakeRange and the inline struct cast. Are you sure the quotes in your NSString are really the ASCII character 0x22?

提交回复
热议问题