Chris Long
Chris Long

Reputation: 3074

How to convert NSString to char?

I'm trying to convert an NSString to a single char. When I write [[NSLocale] currentLocale] objectForKey:NSLocaleDecimalSeparator], I get @",". How can I convert this to ','?

Thank you!

Upvotes: 3

Views: 3721

Answers (1)

Mehrdad Afshari
Mehrdad Afshari

Reputation: 421988

unichar character = [myNSString characterAtIndex:0];

Upvotes: 4

Related Questions