December 2013
Beginner
576 pages
16h 4m
English
When you create a string object by writing an expression such as
@"Programming is fun"
you create an object whose contents cannot be changed. This is referred to as an immutable object. The NSString class deals with immutable strings. You will often want to deal with strings whose characters you can change. For example, you might want to delete some characters from a string or perform a search-and-replace operation on a string. You handle these types of strings through the NSMutableString class.
Program 15.4 shows basic ways to work with immutable character strings in your programs.
Program 15.4
// Basic String Operations#import <Foundation/Foundation.h>int main (int argc, char * ...
Read now
Unlock full access