std::basic_string< CharT, Traits, Alloc > Class Template Reference
[ContainersSequences]

Managing sequences of characters and character-like objects. More...

#include <string>

Collaboration diagram for std::basic_string< CharT, Traits, Alloc >:

Collaboration graph
[legend]
List of all members.

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_stringoperator= (const basic_string &str)
basic_stringoperator= (const CharT *s)
basic_stringoperator= (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_stringoperator+= (const basic_string &str)
basic_stringoperator+= (const CharT *s)
basic_stringoperator+= (CharT c)
basic_stringappend (const basic_string &str)
basic_stringappend (const basic_string &str, size_type position, size_type n)
basic_stringappend (const CharT *s, size_type n)
basic_stringappend (const CharT *s)
basic_stringappend (size_type n, CharT c)
template<class InputIterator>
basic_stringappend (InputIterator first, InputIterator last)
void push_back (CharT c)
basic_stringassign (const basic_string &str)
basic_stringassign (const basic_string &str, size_type position, size_type n)
basic_stringassign (const CharT *s, size_type n)
basic_stringassign (const CharT *s)
basic_stringassign (size_type n, CharT c)
template<class InputIterator>
basic_stringassign (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_stringinsert (size_type position1, const basic_string &str)
basic_stringinsert (size_type position1, const basic_string &str, size_type position2, size_type n)
basic_stringinsert (size_type position, const CharT *s, size_type n)
basic_stringinsert (size_type position, const CharT *s)
basic_stringinsert (size_type position, size_type n, CharT c)
iterator insert (iterator __p, CharT c=CharT())
basic_stringerase (size_type position=0, size_type n=npos)
iterator erase (iterator position)
iterator erase (iterator first, iterator last)
basic_stringreplace (size_type position, size_type n, const basic_string &str)
basic_stringreplace (size_type position1, size_type n1, const basic_string &str, size_type position2, size_type n2)
basic_stringreplace (size_type position, size_type n1, const CharT *s, size_type n2)
basic_stringreplace (size_type position, size_type n1, const CharT *s)
basic_stringreplace (size_type position, size_type n1, size_type n2, CharT c)
basic_stringreplace (iterator __i1, iterator __i2, const basic_string &str)
basic_stringreplace (iterator __i1, iterator __i2, const CharT *s, size_type n)
basic_stringreplace (iterator __i1, iterator __i2, const CharT *s)
basic_stringreplace (iterator __i1, iterator __i2, size_type n, CharT c)
template<class InputIterator>
basic_stringreplace (iterator __i1, iterator __i2, InputIterator __k1, InputIterator __k2)
basic_stringreplace (iterator __i1, iterator __i2, CharT *__k1, CharT *__k2)
basic_stringreplace (iterator __i1, iterator __i2, const CharT *__k1, const CharT *__k2)
basic_stringreplace (iterator __i1, iterator __i2, iterator __k1, iterator __k2)
basic_stringreplace (iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2)
size_type copy (CharT *s, size_type n, size_type position=0) const
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)
RepM_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_stringM_replace (iterator __i1, iterator __i2, InputIterator __k1, InputIterator __k2, input_iterator_tag)
template<class ForwardIterator>
basic_stringM_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 RepS_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

Detailed Description

template<typename CharT, typename Traits, typename Alloc>
class std::basic_string< CharT, Traits, Alloc >

Managing sequences of characters and character-like objects.

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.

Todo:
Doc me! See docs/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more.

Definition at line 109 of file basic_string.h.


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 12:23:01 2005 for libstdc++-v3 Source by  doxygen 1.4.5