1

Using Objective-C, how can I convert the NSString

@"Panda's Expenses"

into this string

@"Panda's Expenses"

?

colincameron
  • 2,696
  • 4
  • 23
  • 46
vivianaranha
  • 2,781
  • 6
  • 33
  • 47

2 Answers2

2

Check these two posts. Should solve your issue.

HTML character decoding in Objective-C / Cocoa Touch

Converting & to & in Objective-C

Community
  • 1
  • 1
Bourne
  • 10,094
  • 5
  • 24
  • 51
0

Try this:

NSString *reformedPanda =
    [@"Panda's Expenses" stringByReplacingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
Sam Ritchie
  • 10,988
  • 4
  • 42
  • 53