Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Friday, April 27, 2012
Objective-C: unichar vs. char
I'm a little confused between a unichar and a char. Can I treat unichar's similar to char's?
Be careful checking for newline that you know the format of your line endings, as Unix (and modern Mac) use \n, but Windows uses \r\n and classic Mac uses \r.
Yes, unichar is internally unsigned short, so you can meaningfully compare it with a char (if the latter is ASCII, but that works fine for '\n').
ReplyDeleteBe careful checking for newline that you know the format of your line endings, as Unix (and modern Mac) use \n, but Windows uses \r\n and classic Mac uses \r.
ReplyDelete