Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从 API 返回 JSON,当文章文本返回时,很多时候会有破折号。但是破折号是通过&ndash实际-...
&ndash
-
如何将 转换&ndash为实际-?
谢谢您的帮助!
NSString *myString = @"Here is &ndash some text"; myString = [myString stringByReplacingOccurrencesOfString:@"&ndash" withString:@"-"];