Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Latest commit

 

History

History
12 lines (8 loc) · 1.01 KB

File metadata and controls

12 lines (8 loc) · 1.01 KB

The key thing to remember about C++ strings is that they are mutable objects representing text as a sequence of Unicode characters (letters, digits, punctuation, etc.).

Manipulating a string can be be done by calling one of its methods. C++ strings are not immutable and their value can be changed after definition.

A string is delimited by double quotes (") characters. Some special characters need escaping using the backslash (\) character.

Finally, there area many ways to concatenate a string. The simplest one is by using the + operator. For any string formatting more complex than simple concatenation sprintf is preferred.