1. Strings


string1 := "\\n"                    // two characters, \ and an n
string2 := "Jon 'Maddog' Orwant"    // literal single quotes
string3 := "Jon \"Maddog\" Orwant"  // literal double quotes
// There is no here-doc in Go.

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