O'Reilly logo

Beginning C++ by Ivor Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7

image

Working with Strings

This chapter is about handling textual data much more effectively and safely that the mechanism provided by a C-style string stored in an array of char elements. In this chapter, you’ll learn:

  • How to create variables of type string
  • What operations are available with objects of type string, and how you use them
  • How you can search a string for a specific character or a substring
  • How you can modify an existing string
  • How you can work with strings containing Unicode characters
  • What a raw string literal is

A Better Class of String

You’ve seen how you can use an array of elements type char to store a null-terminated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required