C + + string

Source: Internet
Author: User

begin gets the iterator that points to the beginning of the string end gets the iterator that points to the end of the string Rbegin Gets the iterator that points to the beginning of the reverse string Rend gets the iterator that points to the end of the reverse string size to get string sizes Length () is the same function as the size function max_size The maximum possible size of a string capacity The possible size of a string without reallocating memory empty to determine if null operator[] takes the first few elements, the equivalent of an array C_str get C-style const char* string data gets the string content address operator= assignment operator Reserve Space Swap swap function Insert Insertion Character Append Append characters push_back Append characters Erase Deleting a string clear clears all contents of the character container Resize Reallocate Space assign is the same as the assignment operator Replace Replace copy string to space Find lookup, returns the 0-based index number RFind Reverse Lookup Find_first_of finds any character in the containing substring and returns to the first position find_first_not_of Find does not contain any characters in a substring, return to the first position Find_last_of finds any character in the containing substring, returning to the last position find_last_not_of Find does not contain any characters in the substring, return to the last position substr (n1,len) gets a substring of length Len starting with a string from N1 Compare strings (all relational operators are supported) Compare comparing Strings operator+ String Links operator+= + = operator operator== judge whether equal operator!= judgment is not equal to operator< Judging whether it is less than operator>> reading a string from the input stream operator<< String writes to the output stream

Getline reads a line from the input stream

C + + string

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.