#include <string>
Collaboration diagram for std::basic_string< CharT, Traits, Alloc >:
Public Types | |
typedef Traits | traits_type |
typedef Traits::char_type | value_type |
typedef Alloc | allocator_type |
typedef Alloc::size_type | size_type |
typedef Alloc::difference_type | difference_type |
typedef Alloc::reference | reference |
typedef Alloc::const_reference | const_reference |
typedef Alloc::pointer | pointer |
typedef Alloc::const_pointer | const_pointer |
typedef __gnu_cxx::normal_iterator< pointer, basic_string > | iterator |
typedef __gnu_cxx::normal_iterator< const_pointer, basic_string > | const_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
typedef std::reverse_iterator< iterator > | reverse_iterator |
Public Member Functions | |
basic_string () | |
basic_string (const Alloc &a) | |
basic_string (const basic_string &str) | |
basic_string (const basic_string &str, size_type position, size_type n=npos) | |
basic_string (const basic_string &str, size_type position, size_type n, const Alloc &a) | |
basic_string (const CharT *s, size_type n, const Alloc &a=Alloc()) | |
basic_string (const CharT *s, const Alloc &a=Alloc()) | |
basic_string (size_type n, CharT c, const Alloc &a=Alloc()) | |
template<class InputIterator> | |
basic_string (InputIterator __beg, InputIterator __end, const Alloc &a=Alloc()) | |
~basic_string () | |
basic_string & | operator= (const basic_string &str) |
basic_string & | operator= (const CharT *s) |
basic_string & | operator= (CharT c) |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
size_type | size () const |
size_type | length () const |
size_type | max_size () const |
void | resize (size_type n, CharT c) |
void | resize (size_type n) |
size_type | capacity () const |
void | reserve (size_type __res_arg=0) |
void | clear () |
bool | empty () const |
const_reference | operator[] (size_type position) const |
reference | operator[] (size_type position) |
const_reference | at (size_type n) const |
reference | at (size_type n) |
basic_string & | operator+= (const basic_string &str) |
basic_string & | operator+= (const CharT *s) |
basic_string & | operator+= (CharT c) |
basic_string & | append (const basic_string &str) |
basic_string & | append (const basic_string &str, size_type position, size_type n) |
basic_string & | append (const CharT *s, size_type n) |
basic_string & | append (const CharT *s) |
basic_string & | append (size_type n, CharT c) |
template<class InputIterator> | |
basic_string & | append (InputIterator first, InputIterator last) |
void | push_back (CharT c) |
basic_string & | assign (const basic_string &str) |
basic_string & | assign (const basic_string &str, size_type position, size_type n) |
basic_string & | assign (const CharT *s, size_type n) |
basic_string & | assign (const CharT *s) |
basic_string & | assign (size_type n, CharT c) |
template<class InputIterator> | |
basic_string & | assign (InputIterator first, InputIterator last) |
void | insert (iterator __p, size_type n, CharT c) |
template<class InputIterator> | |
void | insert (iterator __p, InputIterator __beg, InputIterator __end) |
basic_string & | insert (size_type position1, const basic_string &str) |
basic_string & | insert (size_type position1, const basic_string &str, size_type position2, size_type n) |
basic_string & | insert (size_type position, const CharT *s, size_type n) |
basic_string & | insert (size_type position, const CharT *s) |
basic_string & | insert (size_type position, size_type n, CharT c) |
iterator | insert (iterator __p, CharT c=CharT()) |
basic_string & | erase (size_type position=0, size_type n=npos) |
iterator | erase (iterator position) |
iterator | erase (iterator first, iterator last) |
basic_string & | replace (size_type position, size_type n, const basic_string &str) |
basic_string & | replace (size_type position1, size_type n1, const basic_string &str, size_type position2, size_type n2) |
basic_string & | replace (size_type position, size_type n1, const CharT *s, size_type n2) |
basic_string & | replace (size_type position, size_type n1, const CharT *s) |
basic_string & | replace (size_type position, size_type n1, size_type n2, CharT c) |
basic_string & | replace (iterator __i1, iterator __i2, const basic_string &str) |
basic_string & | replace (iterator __i1, iterator __i2, const CharT *s, size_type n) |
basic_string & | replace (iterator __i1, iterator __i2, const CharT *s) |
basic_string & | replace (iterator __i1, iterator __i2, size_type n, CharT c) |
template<class InputIterator> | |
basic_string & | replace (iterator __i1, iterator __i2, InputIterator __k1, InputIterator __k2) |
basic_string & | replace (iterator __i1, iterator __i2, CharT *__k1, CharT *__k2) |
basic_string & | replace (iterator __i1, iterator __i2, const CharT *__k1, const CharT *__k2) |
basic_string & | replace (iterator __i1, iterator __i2, iterator __k1, iterator __k2) |
basic_string & | replace (iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2) |
size_type | copy (CharT *s, size_type n, size_type position=0) const |
void | swap (basic_string< CharT, Traits, Alloc > &s) |
const CharT * | c_str () const |
const CharT * | data () const |
allocator_type | get_allocator () const |
size_type | find (const CharT *s, size_type position, size_type n) const |
size_type | find (const basic_string &str, size_type position=0) const |
size_type | find (const CharT *s, size_type position=0) const |
size_type | find (CharT c, size_type position=0) const |
size_type | rfind (const basic_string &str, size_type position=npos) const |
size_type | rfind (const CharT *s, size_type position, size_type n) const |
size_type | rfind (const CharT *s, size_type position=npos) const |
size_type | rfind (CharT c, size_type position=npos) const |
size_type | find_first_of (const basic_string &str, size_type position=0) const |
size_type | find_first_of (const CharT *s, size_type position, size_type n) const |
size_type | find_first_of (const CharT *s, size_type position=0) const |
size_type | find_first_of (CharT c, size_type position=0) const |
size_type | find_last_of (const basic_string &str, size_type position=npos) const |
size_type | find_last_of (const CharT *s, size_type position, size_type n) const |
size_type | find_last_of (const CharT *s, size_type position=npos) const |
size_type | find_last_of (CharT c, size_type position=npos) const |
size_type | find_first_not_of (const basic_string &str, size_type position=0) const |
size_type | find_first_not_of (const CharT *s, size_type position, size_type n) const |
size_type | find_first_not_of (const CharT *s, size_type position=0) const |
size_type | find_first_not_of (CharT c, size_type position=0) const |
size_type | find_last_not_of (const basic_string &str, size_type position=npos) const |
size_type | find_last_not_of (const CharT *s, size_type position, size_type n) const |
size_type | find_last_not_of (const CharT *s, size_type position=npos) const |
size_type | find_last_not_of (CharT c, size_type position=npos) const |
basic_string | substr (size_type position=0, size_type n=npos) const |
int | compare (const basic_string &str) const |
int | compare (size_type position, size_type n, const basic_string &str) const |
int | compare (size_type position1, size_type n1, const basic_string &str, size_type position2, size_type n2) const |
int | compare (const CharT *s) const |
int | compare (size_type position, size_type n1, const CharT *s) const |
int | compare (size_type position, size_type n1, const CharT *s, size_type n2) const |
Static Public Attributes | |
static const size_type | npos |
Private Member Functions | |
CharT * | M_data () const |
CharT * | M_data (CharT *__p) |
Rep * | M_rep () const |
iterator | M_ibegin () const |
iterator | M_iend () const |
void | M_leak () |
iterator | M_check (size_type position) const |
iterator | M_fold (size_type position, size_type __off) const |
void | M_mutate (size_type position, size_type __len1, size_type __len2) |
void | M_leak_hard () |
template<class InputIterator> | |
basic_string & | M_replace (iterator __i1, iterator __i2, InputIterator __k1, InputIterator __k2, input_iterator_tag) |
template<class ForwardIterator> | |
basic_string & | M_replace_safe (iterator __i1, iterator __i2, ForwardIterator __k1, ForwardIterator __k2) |
Static Private Member Functions | |
template<class Iterator> | |
static void | S_copy_chars (CharT *__p, Iterator __k1, Iterator __k2) |
static void | S_copy_chars (CharT *__p, iterator __k1, iterator __k2) |
static void | S_copy_chars (CharT *__p, const_iterator __k1, const_iterator __k2) |
static void | S_copy_chars (CharT *__p, CharT *__k1, CharT *__k2) |
static void | S_copy_chars (CharT *__p, const CharT *__k1, const CharT *__k2) |
static Rep & | S_empty_rep () |
template<class InIter> | |
static CharT * | S_construct_aux (InIter __beg, InIter __end, const Alloc &a, __false_type) |
template<class InIter> | |
static CharT * | S_construct_aux (InIter __beg, InIter __end, const Alloc &a, __true_type) |
template<class InIter> | |
static CharT * | S_construct (InIter __beg, InIter __end, const Alloc &a) |
template<class InIter> | |
static CharT * | S_construct (InIter __beg, InIter __end, const Alloc &a, input_iterator_tag) |
template<class FwdIter> | |
static CharT * | S_construct (FwdIter __beg, FwdIter __end, const Alloc &a, forward_iterator_tag) |
static CharT * | S_construct (size_type __req, CharT c, const Alloc &a) |
Private Attributes | |
Alloc_hider | M_dataplus |
Static Private Attributes | |
static size_type | S_empty_rep_storage [(sizeof(Rep)+sizeof(CharT)+sizeof(size_type)-1)/sizeof(size_type)] |
Classes | |
struct | Alloc_hider |
struct | Rep |
Meets the requirements of a container, a reversible container, and a sequence. Of the optional sequence requirements, only push_back
, at
, and array access are supported.
Definition at line 109 of file basic_string.h.