21. Class string and String Stream Processing: A Deeper Look

Suit the action to the word, the word to the action; with this special observance, that you o’erstep not the modesty of nature.

—William Shakespeare

The difference between the almost-right word and the right word is really a large matter—it’s the difference between the lightning bug and the lightning.

—Mark Twain

Mum’s the word.

—Miguel de Cervantes

I have made this letter longer than usual, because I lack the time to make it short.

—Blaise Pascal

Objectives

In this chapter you’ll:

• Manipulate string objects.

• Determine string characteristics.

• Find, replace and insert characters in strings.

• Convert string objects to pointer-based strings and vice versa.

• Use string iterators. ...

Get C++ How to Program, Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.