std::basic_string< cxxtools::Char > Class Template Reference

Unicode capable strings. More...

#include <cxxtools/string.h>

Classes

struct  Data
struct  Ptr

Public Types

typedef cxxtools::Char value_type
typedef size_t size_type
typedef char_traits
< cxxtools::Char
traits_type
typedef std::allocator
< cxxtools::Char
allocator_type
typedef
allocator_type::difference_type 
difference_type
typedef allocator_type::reference reference
typedef
allocator_type::const_reference 
const_reference
typedef allocator_type::pointer pointer
typedef
allocator_type::const_pointer 
const_pointer
typedef value_typeiterator
typedef const value_typeconst_iterator

Public Member Functions

 basic_string (const allocator_type &a=allocator_type())
 basic_string (const cxxtools::Char *str, const allocator_type &a=allocator_type())
 basic_string (const wchar_t *str, const allocator_type &a=allocator_type())
 basic_string (const wchar_t *str, size_type n, const allocator_type &a=allocator_type())
 basic_string (const std::string &str, const allocator_type &a=allocator_type())
 basic_string (const char *str, const allocator_type &a=allocator_type())
 basic_string (const char *str, size_type n, const allocator_type &a=allocator_type())
 basic_string (const cxxtools::Char *str, size_type n, const allocator_type &a=allocator_type())
 basic_string (size_type n, cxxtools::Char c, const allocator_type &a=allocator_type())
 basic_string (const basic_string &str)
 basic_string (const basic_string &str, const allocator_type &a)
 basic_string (const basic_string &str, size_type pos, const allocator_type &a=allocator_type())
 basic_string (const basic_string &str, size_type pos, size_type n, const allocator_type &a=allocator_type())
 basic_string (const cxxtools::Char *begin, const cxxtools::Char *end, const allocator_type &a=allocator_type())
template<typename InputIterator >
 basic_string (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())
 ~basic_string ()
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reference operator[] (size_type n)
const_reference operator[] (size_type n) const
reference at (size_type n)
const_reference at (size_type n) const
void push_back (cxxtools::Char ch)
void resize (size_t n, cxxtools::Char ch=value_type())
void reserve (size_t n=0)
void swap (basic_string &str)
allocator_type get_allocator () const
size_type copy (cxxtools::Char *a, size_type n, size_type pos=0) const
basic_string substr (size_type pos, size_type n) const
basic_string substr (size_type pos=0) const
size_type length () const
size_type size () const
bool empty () const
size_type max_size () const
size_type capacity () const
const cxxtools::Chardata () const
const cxxtools::Charc_str () const
basic_stringassign (const basic_string &str)
basic_stringassign (const basic_string &str, size_type pos, size_type n)
basic_stringassign (const string &str)
basic_stringassign (const string &str, size_type pos, size_type n)
basic_stringassign (const wchar_t *str)
basic_stringassign (const wchar_t *str, size_type n)
basic_stringassign (const cxxtools::Char *str)
basic_stringassign (const cxxtools::Char *str, size_type length)
basic_stringassign (const char *str)
basic_stringassign (const char *str, size_type length)
basic_stringassign (size_type n, cxxtools::Char c)
template<typename InputIterator >
basic_stringassign (InputIterator begin, InputIterator end)
basic_stringappend (const cxxtools::Char *str)
basic_stringappend (const cxxtools::Char *str, size_type n)
basic_stringappend (size_type n, cxxtools::Char ch)
basic_stringappend (const basic_string &str)
basic_stringappend (const basic_string &str, size_type pos, size_type n)
template<typename InputIterator >
basic_stringappend (InputIterator begin, InputIterator end)
basic_stringappend (const cxxtools::Char *begin, const cxxtools::Char *end)
basic_stringinsert (size_type pos, const cxxtools::Char *str)
basic_stringinsert (size_type pos, const cxxtools::Char *str, size_type n)
basic_stringinsert (size_type pos, size_type n, cxxtools::Char ch)
basic_stringinsert (size_type pos, const basic_string &str)
basic_stringinsert (size_type pos, const basic_string &str, size_type pos2, size_type n)
basic_stringinsert (iterator p, cxxtools::Char ch)
basic_stringinsert (iterator p, size_type n, cxxtools::Char ch)
void clear ()
basic_stringerase (size_type pos=0, size_type n=npos)
iterator erase (iterator pos)
iterator erase (iterator first, iterator last)
basic_stringreplace (size_type pos, size_type n, const cxxtools::Char *str)
basic_stringreplace (size_type pos, size_type n, const cxxtools::Char *str, size_type n2)
basic_stringreplace (size_type pos, size_type n, size_type n2, cxxtools::Char ch)
basic_stringreplace (size_type pos, size_type n, const basic_string &str)
basic_stringreplace (size_type pos, size_type n, const basic_string &str, size_type pos2, size_type n2)
basic_stringreplace (iterator i1, iterator i2, const cxxtools::Char *str)
basic_stringreplace (iterator i1, iterator i2, const cxxtools::Char *str, size_type n)
basic_stringreplace (iterator i1, iterator i2, size_type n, cxxtools::Char ch)
basic_stringreplace (iterator i1, iterator i2, const basic_string &str)
int compare (const basic_string &str) const
int compare (const cxxtools::Char *str) const
int compare (const cxxtools::Char *str, size_type n) const
int compare (const wchar_t *str) const
int compare (const wchar_t *str, size_type n) const
int compare (const std::string &str) const
int compare (const char *str) const
int compare (const char *str, size_type n) const
int compare (size_type pos, size_type n, const basic_string &str) const
int compare (size_type pos, size_type n, const basic_string &str, size_type pos2, size_type n2) const
int compare (size_type pos, size_type n, const cxxtools::Char *str) const
int compare (size_type pos, size_type n, const cxxtools::Char *str, size_type n2) const
size_type find (const basic_string &str, size_type pos=0) const
size_type find (const cxxtools::Char *str, size_type pos, size_type n) const
size_type find (const cxxtools::Char *str, size_type pos=0) const
size_type find (cxxtools::Char ch, size_type pos=0) const
size_type rfind (const basic_string &str, size_type pos=npos) const
size_type rfind (const cxxtools::Char *str, size_type pos, size_type n) const
size_type rfind (const cxxtools::Char *str, size_type pos=npos) const
size_type rfind (cxxtools::Char ch, size_type pos=npos) const
size_type find_first_of (const basic_string &str, size_type pos=0) const
size_type find_first_of (const cxxtools::Char *s, size_type pos, size_type n) const
size_type find_first_of (const cxxtools::Char *str, size_type pos=0) const
size_type find_first_of (const cxxtools::Char ch, size_type pos=0) const
size_type find_last_of (const basic_string &str, size_type pos=npos) const
size_type find_last_of (const cxxtools::Char *s, size_type pos, size_type n) const
size_type find_last_of (const cxxtools::Char *str, size_type pos=npos) const
size_type find_last_of (const cxxtools::Char ch, size_type pos=npos) const
size_type find_first_not_of (const basic_string &str, size_type pos=0) const
size_type find_first_not_of (const cxxtools::Char *s, size_type pos, size_type n) const
size_type find_first_not_of (const cxxtools::Char *str, size_type pos=0) const
size_type find_first_not_of (const cxxtools::Char ch, size_type pos=0) const
size_type find_last_not_of (const basic_string &str, size_type pos=npos) const
size_type find_last_not_of (const cxxtools::Char *tok, size_type pos, size_type n) const
size_type find_last_not_of (const cxxtools::Char *str, size_type pos=npos) const
size_type find_last_not_of (cxxtools::Char ch, size_type pos=npos) const
std::string narrow (char dfault= '?') const
template<typename OutIterT >
OutIterT toUtf16 (OutIterT to) const
basic_stringoperator= (const basic_string &str)
basic_stringoperator= (const string &str)
basic_stringoperator= (const char *str)
basic_stringoperator= (const cxxtools::Char *str)
basic_stringoperator= (cxxtools::Char c)
basic_stringoperator+= (const basic_string &str)
basic_stringoperator+= (const cxxtools::Char *str)
basic_stringoperator+= (cxxtools::Char c)

Static Public Member Functions

static basic_string widen (const char *str)
static basic_string widen (const std::string &str)
template<typename InIterT >
static basic_string fromUtf16 (InIterT from, InIterT fromEnd)

Static Public Attributes

static const size_type npos = static_cast<size_type>(-1)

Detailed Description

template<>
class std::basic_string< cxxtools::Char >

Unicode capable strings.

Member Typedef Documentation

typedef std::allocator<cxxtools::Char> std::basic_string< cxxtools::Char >::allocator_type
typedef const value_type* std::basic_string< cxxtools::Char >::const_iterator
typedef allocator_type::const_pointer std::basic_string< cxxtools::Char >::const_pointer
typedef allocator_type::const_reference std::basic_string< cxxtools::Char >::const_reference
typedef allocator_type::difference_type std::basic_string< cxxtools::Char >::difference_type
typedef value_type* std::basic_string< cxxtools::Char >::iterator
typedef allocator_type::pointer std::basic_string< cxxtools::Char >::pointer
typedef allocator_type::reference std::basic_string< cxxtools::Char >::reference
typedef size_t std::basic_string< cxxtools::Char >::size_type
typedef char_traits< cxxtools::Char > std::basic_string< cxxtools::Char >::traits_type
typedef cxxtools::Char std::basic_string< cxxtools::Char >::value_type

Constructor & Destructor Documentation

std::basic_string< cxxtools::Char >::basic_string ( const allocator_type a = allocator_type())
explicit
std::basic_string< cxxtools::Char >::basic_string ( const cxxtools::Char str,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( const wchar_t *  str,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( const wchar_t *  str,
size_type  n,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( const std::string &  str,
const allocator_type a = allocator_type() 
)
explicit
std::basic_string< cxxtools::Char >::basic_string ( const char *  str,
const allocator_type a = allocator_type() 
)
explicit
std::basic_string< cxxtools::Char >::basic_string ( const char *  str,
size_type  n,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( const cxxtools::Char str,
size_type  n,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( size_type  n,
cxxtools::Char  c,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( const basic_string< cxxtools::Char > &  str)
std::basic_string< cxxtools::Char >::basic_string ( const basic_string< cxxtools::Char > &  str,
const allocator_type a 
)
std::basic_string< cxxtools::Char >::basic_string ( const basic_string< cxxtools::Char > &  str,
size_type  pos,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( const basic_string< cxxtools::Char > &  str,
size_type  pos,
size_type  n,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::basic_string ( const cxxtools::Char begin,
const cxxtools::Char end,
const allocator_type a = allocator_type() 
)
template<typename InputIterator >
std::basic_string< cxxtools::Char >::basic_string ( InputIterator  begin,
InputIterator  end,
const allocator_type a = allocator_type() 
)
std::basic_string< cxxtools::Char >::~basic_string ( )

Member Function Documentation

basic_string& std::basic_string< cxxtools::Char >::append ( const cxxtools::Char str)
basic_string& std::basic_string< cxxtools::Char >::append ( const cxxtools::Char str,
size_type  n 
)
basic_string& std::basic_string< cxxtools::Char >::append ( size_type  n,
cxxtools::Char  ch 
)
basic_string& std::basic_string< cxxtools::Char >::append ( const basic_string< cxxtools::Char > &  str)
basic_string& std::basic_string< cxxtools::Char >::append ( const basic_string< cxxtools::Char > &  str,
size_type  pos,
size_type  n 
)
template<typename InputIterator >
basic_string& std::basic_string< cxxtools::Char >::append ( InputIterator  begin,
InputIterator  end 
)
basic_string& std::basic_string< cxxtools::Char >::append ( const cxxtools::Char begin,
const cxxtools::Char end 
)
basic_string& std::basic_string< cxxtools::Char >::assign ( const basic_string< cxxtools::Char > &  str)
basic_string& std::basic_string< cxxtools::Char >::assign ( const basic_string< cxxtools::Char > &  str,
size_type  pos,
size_type  n 
)
basic_string& std::basic_string< cxxtools::Char >::assign ( const string &  str)
basic_string& std::basic_string< cxxtools::Char >::assign ( const string &  str,
size_type  pos,
size_type  n 
)
basic_string& std::basic_string< cxxtools::Char >::assign ( const wchar_t *  str)
basic_string& std::basic_string< cxxtools::Char >::assign ( const wchar_t *  str,
size_type  n 
)
basic_string& std::basic_string< cxxtools::Char >::assign ( const cxxtools::Char str)
basic_string& std::basic_string< cxxtools::Char >::assign ( const cxxtools::Char str,
size_type  length 
)
basic_string& std::basic_string< cxxtools::Char >::assign ( const char *  str)
basic_string& std::basic_string< cxxtools::Char >::assign ( const char *  str,
size_type  length 
)
basic_string& std::basic_string< cxxtools::Char >::assign ( size_type  n,
cxxtools::Char  c 
)
template<typename InputIterator >
basic_string& std::basic_string< cxxtools::Char >::assign ( InputIterator  begin,
InputIterator  end 
)
reference std::basic_string< cxxtools::Char >::at ( size_type  n)
inline
const_reference std::basic_string< cxxtools::Char >::at ( size_type  n) const
inline
iterator std::basic_string< cxxtools::Char >::begin ( )
inline
const_iterator std::basic_string< cxxtools::Char >::begin ( ) const
inline
const cxxtools::Char* std::basic_string< cxxtools::Char >::c_str ( ) const
inline
size_type std::basic_string< cxxtools::Char >::capacity ( ) const
inline
void std::basic_string< cxxtools::Char >::clear ( )
inline
int std::basic_string< cxxtools::Char >::compare ( const basic_string< cxxtools::Char > &  str) const
int std::basic_string< cxxtools::Char >::compare ( const cxxtools::Char str) const
int std::basic_string< cxxtools::Char >::compare ( const cxxtools::Char str,
size_type  n 
) const
int std::basic_string< cxxtools::Char >::compare ( const wchar_t *  str) const
int std::basic_string< cxxtools::Char >::compare ( const wchar_t *  str,
size_type  n 
) const
int std::basic_string< cxxtools::Char >::compare ( const std::string &  str) const
inline
int std::basic_string< cxxtools::Char >::compare ( const char *  str) const
int std::basic_string< cxxtools::Char >::compare ( const char *  str,
size_type  n 
) const
int std::basic_string< cxxtools::Char >::compare ( size_type  pos,
size_type  n,
const basic_string< cxxtools::Char > &  str 
) const
int std::basic_string< cxxtools::Char >::compare ( size_type  pos,
size_type  n,
const basic_string< cxxtools::Char > &  str,
size_type  pos2,
size_type  n2 
) const
int std::basic_string< cxxtools::Char >::compare ( size_type  pos,
size_type  n,
const cxxtools::Char str 
) const
int std::basic_string< cxxtools::Char >::compare ( size_type  pos,
size_type  n,
const cxxtools::Char str,
size_type  n2 
) const
size_type std::basic_string< cxxtools::Char >::copy ( cxxtools::Char a,
size_type  n,
size_type  pos = 0 
) const
const cxxtools::Char* std::basic_string< cxxtools::Char >::data ( ) const
inline
bool std::basic_string< cxxtools::Char >::empty ( ) const
inline
iterator std::basic_string< cxxtools::Char >::end ( )
inline
const_iterator std::basic_string< cxxtools::Char >::end ( ) const
inline
basic_string& std::basic_string< cxxtools::Char >::erase ( size_type  pos = 0,
size_type  n = npos 
)
iterator std::basic_string< cxxtools::Char >::erase ( iterator  pos)
iterator std::basic_string< cxxtools::Char >::erase ( iterator  first,
iterator  last 
)
size_type std::basic_string< cxxtools::Char >::find ( const basic_string< cxxtools::Char > &  str,
size_type  pos = 0 
) const
size_type std::basic_string< cxxtools::Char >::find ( const cxxtools::Char str,
size_type  pos,
size_type  n 
) const
size_type std::basic_string< cxxtools::Char >::find ( const cxxtools::Char str,
size_type  pos = 0 
) const
size_type std::basic_string< cxxtools::Char >::find ( cxxtools::Char  ch,
size_type  pos = 0 
) const
size_type std::basic_string< cxxtools::Char >::find_first_not_of ( const basic_string< cxxtools::Char > &  str,
size_type  pos = 0 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_first_not_of ( const cxxtools::Char s,
size_type  pos,
size_type  n 
) const
size_type std::basic_string< cxxtools::Char >::find_first_not_of ( const cxxtools::Char str,
size_type  pos = 0 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_first_not_of ( const cxxtools::Char  ch,
size_type  pos = 0 
) const
size_type std::basic_string< cxxtools::Char >::find_first_of ( const basic_string< cxxtools::Char > &  str,
size_type  pos = 0 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_first_of ( const cxxtools::Char s,
size_type  pos,
size_type  n 
) const
size_type std::basic_string< cxxtools::Char >::find_first_of ( const cxxtools::Char str,
size_type  pos = 0 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_first_of ( const cxxtools::Char  ch,
size_type  pos = 0 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_last_not_of ( const basic_string< cxxtools::Char > &  str,
size_type  pos = npos 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_last_not_of ( const cxxtools::Char tok,
size_type  pos,
size_type  n 
) const
size_type std::basic_string< cxxtools::Char >::find_last_not_of ( const cxxtools::Char str,
size_type  pos = npos 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_last_not_of ( cxxtools::Char  ch,
size_type  pos = npos 
) const
size_type std::basic_string< cxxtools::Char >::find_last_of ( const basic_string< cxxtools::Char > &  str,
size_type  pos = npos 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_last_of ( const cxxtools::Char s,
size_type  pos,
size_type  n 
) const
size_type std::basic_string< cxxtools::Char >::find_last_of ( const cxxtools::Char str,
size_type  pos = npos 
) const
inline
size_type std::basic_string< cxxtools::Char >::find_last_of ( const cxxtools::Char  ch,
size_type  pos = npos 
) const
inline
template<typename InIterT >
static basic_string std::basic_string< cxxtools::Char >::fromUtf16 ( InIterT  from,
InIterT  fromEnd 
)
static
allocator_type std::basic_string< cxxtools::Char >::get_allocator ( ) const
inline
basic_string& std::basic_string< cxxtools::Char >::insert ( size_type  pos,
const cxxtools::Char str 
)
basic_string& std::basic_string< cxxtools::Char >::insert ( size_type  pos,
const cxxtools::Char str,
size_type  n 
)
basic_string& std::basic_string< cxxtools::Char >::insert ( size_type  pos,
size_type  n,
cxxtools::Char  ch 
)
basic_string& std::basic_string< cxxtools::Char >::insert ( size_type  pos,
const basic_string< cxxtools::Char > &  str 
)
basic_string& std::basic_string< cxxtools::Char >::insert ( size_type  pos,
const basic_string< cxxtools::Char > &  str,
size_type  pos2,
size_type  n 
)
basic_string& std::basic_string< cxxtools::Char >::insert ( iterator  p,
cxxtools::Char  ch 
)
basic_string& std::basic_string< cxxtools::Char >::insert ( iterator  p,
size_type  n,
cxxtools::Char  ch 
)
size_type std::basic_string< cxxtools::Char >::length ( ) const
inline
size_type std::basic_string< cxxtools::Char >::max_size ( ) const
inline
std::string std::basic_string< cxxtools::Char >::narrow ( char  dfault = '?') const
basic_string& std::basic_string< cxxtools::Char >::operator+= ( const basic_string< cxxtools::Char > &  str)
inline
basic_string& std::basic_string< cxxtools::Char >::operator+= ( const cxxtools::Char str)
inline
basic_string& std::basic_string< cxxtools::Char >::operator+= ( cxxtools::Char  c)
inline
basic_string& std::basic_string< cxxtools::Char >::operator= ( const basic_string< cxxtools::Char > &  str)
inline
basic_string& std::basic_string< cxxtools::Char >::operator= ( const string &  str)
inline
basic_string& std::basic_string< cxxtools::Char >::operator= ( const char *  str)
inline
basic_string& std::basic_string< cxxtools::Char >::operator= ( const cxxtools::Char str)
inline
basic_string& std::basic_string< cxxtools::Char >::operator= ( cxxtools::Char  c)
inline
reference std::basic_string< cxxtools::Char >::operator[] ( size_type  n)
inline
const_reference std::basic_string< cxxtools::Char >::operator[] ( size_type  n) const
inline
void std::basic_string< cxxtools::Char >::push_back ( cxxtools::Char  ch)
inline
basic_string& std::basic_string< cxxtools::Char >::replace ( size_type  pos,
size_type  n,
const cxxtools::Char str 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( size_type  pos,
size_type  n,
const cxxtools::Char str,
size_type  n2 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( size_type  pos,
size_type  n,
size_type  n2,
cxxtools::Char  ch 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( size_type  pos,
size_type  n,
const basic_string< cxxtools::Char > &  str 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( size_type  pos,
size_type  n,
const basic_string< cxxtools::Char > &  str,
size_type  pos2,
size_type  n2 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( iterator  i1,
iterator  i2,
const cxxtools::Char str 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( iterator  i1,
iterator  i2,
const cxxtools::Char str,
size_type  n 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( iterator  i1,
iterator  i2,
size_type  n,
cxxtools::Char  ch 
)
basic_string& std::basic_string< cxxtools::Char >::replace ( iterator  i1,
iterator  i2,
const basic_string< cxxtools::Char > &  str 
)
void std::basic_string< cxxtools::Char >::reserve ( size_t  n = 0)
void std::basic_string< cxxtools::Char >::resize ( size_t  n,
cxxtools::Char  ch = value_type() 
)
size_type std::basic_string< cxxtools::Char >::rfind ( const basic_string< cxxtools::Char > &  str,
size_type  pos = npos 
) const
size_type std::basic_string< cxxtools::Char >::rfind ( const cxxtools::Char str,
size_type  pos,
size_type  n 
) const
size_type std::basic_string< cxxtools::Char >::rfind ( const cxxtools::Char str,
size_type  pos = npos 
) const
size_type std::basic_string< cxxtools::Char >::rfind ( cxxtools::Char  ch,
size_type  pos = npos 
) const
size_type std::basic_string< cxxtools::Char >::size ( ) const
inline
basic_string std::basic_string< cxxtools::Char >::substr ( size_type  pos,
size_type  n 
) const
inline
basic_string std::basic_string< cxxtools::Char >::substr ( size_type  pos = 0) const
inline
void std::basic_string< cxxtools::Char >::swap ( basic_string< cxxtools::Char > &  str)
template<typename OutIterT >
OutIterT std::basic_string< cxxtools::Char >::toUtf16 ( OutIterT  to) const
static basic_string std::basic_string< cxxtools::Char >::widen ( const char *  str)
static
static basic_string std::basic_string< cxxtools::Char >::widen ( const std::string &  str)
static

Member Data Documentation

const size_type std::basic_string< cxxtools::Char >::npos = static_cast<size_type>(-1)
static

The documentation for this class was generated from the following file: