1

Using Objective-C, how can I convert the NSString

@"Panda's Expenses"

into this string

@"Panda's Expenses"

?

colincameron
  • 2,619
  • 4
  • 22
  • 46
vivianaranha
  • 2,741
  • 6
  • 32
  • 45

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
  • 9,700
  • 5
  • 23
  • 51
0

Try this:

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