I'm a little confused between a unichar and a char. Can I treat unichar's similar to char's?
For example, can I do this:
-(BOOL)isNewLine:(unichar)c { if(c == '\n') return YES; else return NO; }
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'
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With