November 2013
Beginner
325 pages
9h 47m
English
The Foundation framework gives the developer a few easy ways to read from and write to files. In this chapter, you will try a few of them out.
First, let’s see how you would take the contents of an NSString and put it into a file. When you write a string to a file, you need to specify which string encoding you are using. A string encoding describes how each character is stored as an array of bytes. ASCII is a string encoding that defines the letter ‘A’ as being stored as 01000001. In UTF-16, the letter ‘A’ is stored as 0000000001000001.
The Foundation framework supports about 20 different string encodings, but we end up using UTF a lot because ...
Read now
Unlock full access