Sync substring code example and discussion.

Substring code example has 4 uses of substring but the discussion
refers to only 3.