Challenge: using readline()

The return value of the readline function from Chapter 8 is of type const char *, or a C string. It is possible to get an NSString instance with the same characters as any given C string by sending the stringWithUTF8String: class message to the NSString class and passing in the C string as its argument.

Re-write the readline() challenge from Chapter 8 to use an NSString and NSLog() rather than a C string and printf(). You will want to create a new Foundation Command Line Tool.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset