Start here · Essential guide
C++ String Methods
A guide to C++ string methods: std::string member functions like size, substr, find and replace, plus the C-style functions in <cstring>, with examples.
Strings, Containers and Memory
The main std::string member functions and how C strings work.
Start here · Essential guide
A guide to C++ string methods: std::string member functions like size, substr, find and replace, plus the C-style functions in <cstring>, with examples.
Learn the string functions in C from <string.h>, such as strlen, strcpy, strcat, strcmp, and strstr, with short examples and buffer-safety tips.
In C programming, strings are char arrays ending in a null character, while C++ adds std::string. Compare both with short examples and common mistakes.
A C string is a char array that ends with a null character. Learn how it is stored, why the terminator matters, and how strlen counts characters.
Related topics