共用方式為


<string> Members

Reference

Typedefs

string

A type that describes a specialization of the template class basic_string with elements of type char as a string.

wstring

A type that describes a specialization of the template class basic_string with elements of type wchar_t as a wstring.

Operators

operator+

Concatenates two string objects.

operator!=

Tests if the string object on the left side of the operator is not equal to the string object on the right side.

operator==

Tests if the string object on the left side of the operator is equal to the string object on the right side.

operator<

Tests if the string object on the left side of the operator is less than to the string object on the right side.

operator<=

Tests if the string object on the left side of the operator is less than or equal to the string object on the right side.

operator<<

A template function that inserts a string into the output stream.

operator>

Tests if the string object on the left side of the operator is greater than to the string object on the right side.

operator>=

Tests if the string object on the left side of the operator is greater than or equal to the string object on the right side.

operator>>

A template function that extracts a string from the input stream.

Specialized Template Functions

swap

Exchanges the arrays of characters of two strings.

Functions

getline

Extract strings from the input stream line by line.

Classes

basic_string Class

A template class that describes objects that can store a sequence of arbitrary character-like objects.

char_traits Class

A template class that describes attributes associated with a character of type CharType

Specializations

char_traits<char> Class

A class that is a specialization of the template class char_traits<CharType> to an element of type char.

char_traits<wchar_t> Class

A class that is a specialization of the template class char_traits<CharType> to an element of type wchar_t.

See Also

Concepts

<string>

Thread Safety in the Standard C++ Library