string - C++ Users

Learn how to use the string class in C++ to represent sequences of characters. The web page provides the member types, functions, constants and non-member overloads of the string class, with examples and links to related topics.

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
Strings library - cppreference.com

String classes (std::string etc.) The class template std::basic_string generalizes how sequences of characters are manipulated and stored. String creation, manipulation, and destruction are all handled by a convenient set of class methods and related functions. Several specializations of std::basic_string are provided for commonly-used types:

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
C++ Strings - W3Schools

Learn how to use strings in C++, a collection of characters surrounded by double quotes. See examples of how to create, assign and manipulate strings, and how to include the string library header file.

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
std::string class in C++ - GeeksforGeeks

Learn how to use the std::string class to represent and manipulate sequences of characters in C++. See examples of input, output, comparison, concatenation, and other operations on strings.

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
C++ String Class - Programiz

Learn how to use the string class in C++ to represent and manipulate sequences of characters. See examples of common functions such as find, append, compare, and more.

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
C++ string - working with strings in C++ - ZetCode

C++ string tutorial shows how to work with strings in C++. A string is a sequence of characters. C++ has the std::string type to represent strings. The characters in a string literal must be enclosed between double quotation marks. C++ string access characters. To access the characters of a string, we can use the [] operator or the at method.

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
<cstring> (string.h) - C++ Users

Copy string (function) strncpy Copy characters from string (function) Concatenation: strcat Concatenate strings (function) strncat Append characters from string (function) Comparison: memcmp Compare two blocks of memory (function) strcmp Compare two strings (function) strcoll Compare two strings using locale (function) strncmp

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
C++ String – std::string Example in C++ - freeCodeCamp.org

The std::string class that's provided by the C++ Standard Library is a much safer alternative. Here's how you use it: How to define a std::string # include <iostream> # include <string> // the C++ Standard String Class int main { std:: string str = "C++ String"; std:: cout << str << "\n"; // prints `C++ String`"}

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
std::basic_string - cppreference.com

The class template basic_string stores and manipulates sequences of character-like objects, which are non-array objects of TrivialType and StandardLayoutType.The class is dependent neither on the character type nor on the nature of operations on that type. The definitions of the operations are supplied via the Traits template parameter - a specialization of std::char_traits or a compatible ...

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)
String Functions in C++ - GeeksforGeeks

Learn how to use the std::string class to perform common string operations in C++. See examples of length, access, append, compare, substr, find, replace, insert, erase and c_str functions.

Visit visit

Your search and this result

  • The search term appears in the result: cplusplus string
  • The website matches one or more of your search terms
  • Other websites that include your search terms link to this result
  • The result is in English (United States)