Chapter 40. String Object Concatenation

 

And above all things, never think that you’re not good enough yourself. A man should never think that. My belief is that in life people will take you at your own reckoning.

 
 --Isaac Asimov
 

Luck favors the prepared!

 
 --Edna Mole

Introduction

In several of my projects I have had occasion to tokenize out string fragments from composite strings and then package them up again in a different form. We saw in Chapter 27 how tokenization can be effected easily and efficiently. Using the component described here, the tokens can be just as easily packaged up again.

Whereas we looked at how to write an output iterator for C-style string concatenation in the previous chapter, now we’re going to look at the more object-oriented ...

Get Extended STL, Volume 1: Collections and Iterators 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.