static bool lt(const char_type& c1, const char_type& c2) Character Traits Returns true if c1 is less than c2.
static int compare(const char_type* p1, const char_type* p2, size_t n) Character Traits Three-way lexicographical comparison, much like strncmp.
static size_t length(const char* p) Character Traits Returns length of a null-terminated array of characters.
static const char_type* find(const char_type* p, size_t n, const char_type& c) Character Traits Finds c in [p, p+n) , returning 0 if not found.
static char_type* move(char_type* s, const char_type* p, size_t n) Character Traits Copies characters from [p, p+n) to the (possibly overlapping) range [s, s+n).
static char_type* copy(char_type* s, const char_type* p, size_t n) Character Traits Copies characters from [p, p+n) to the (non- overlapping) range [s, s+n).
static char_type* assign(char_type* s, size_t n, char_type c) Character Traits Assigns the value c to every element in the range [s, s+n).
static int_type eof() Character Traits Returns the value used as an EOF indicator.
static int_type not_eof(const int_type& c) Character Traits Returns a value that is not equal to eof() . Returns c unless c is equal to eof().
static char_type to_char_type(const int_type& c) Character Traits Returns the char_type value corresponding to c, if such a value exists.
static int_type to_int_type(const char_type& c) Character Traits Returns a int_type representation of c.
static bool eq_int_type(cosnt int_type& c1, const int_type& c1) Character Traits Tests whether two int_type values are equal. If the values can also be represented as char_type, then eq and eq_int_type must be consistent with each other.
New members

None. All of char_traits's members are defined in the Character Traits requirements.

See also

Character Traits, string

basic_string<charT, traits, Alloc>

Category: containers

Component type: type

Description

The basic_string class represents a Sequence of characters. It contains all the usual operations of a Sequence, and, additionally, it contains standard string operations such as search and concatenation.

The basic_string class is parameterized by character type, and by that type's Character Traits. Most of the time, however, there is no need to use the basic_string template directly. The types string and wstring are typedefs for, respectively, basic_string<char> and

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату