1. Strings

Introduction

// Objective-C supersedes traditional C char* strings with constant
// string objects, using the @ character before the opening ".
NSString *string1 = @"Jon 'Maddog' Orwant'";
NSString *string2 = @"\n";                     // a "newline" character
NSString *string3 = @"Jon \"Maddog\" Orwant";  // literal double quotes

Accessing Substrings

Establishing a Default Value

Exchanging Values Without Using Temporary Variables

Converting Between ASCII Characters and Values

Processing a String One Character at a Time

Reversing a String by Word or Character

Expanding and Compressing Tabs

Expanding Variables in User Input

Controlling Case

Interpolating Functions and Expressions Within Strings

Indenting Here Documents

Reformatting Paragraphs

Escaping Characters

Trimming Blanks from the Ends of a String

Parsing Comma-Separated Data

Soundex Matching

Program: fixstyle

Program: psgrep