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
Program 15.4 shows basic ways to work with immutable character strings in your programs.
// Basic String Operations#import <Foundation/Foundation.h>int main (int argc, char * ...