Chapter 19. 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


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 Visual C++ 2008: How to Program, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.