Chapter 18. Class string and String Stream Processing

 

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 learn:

  • To use class string from the C++ Standard Library to treat strings as full-fledged objects.

  • To assign, concatenate, compare, search and swap strings.

  • To determine string characteristics.

  • To find, replace ...

Get C++ How to Program, Sixth 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.