ClanLib  2.3.7
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
CL_String16 Class Reference

String container template. More...

#include <string16.h>

Inheritance diagram for CL_String16:
Inheritance graph
[legend]

Public Types

typedef wchar_t char_type
 
typedef const wchar_t * const_iterator
 
typedef wchar_t * iterator
 
typedef unsigned int size_type
 

Public Member Functions

 CL_String16 ()
 
 CL_String16 (const std::wstring &source)
 Constructs a StringContainer. More...
 
 CL_String16 (const CL_String16 &source)
 Constructs a StringContainer. More...
 
 CL_String16 (const CL_StringData16 &source)
 Constructs a StringContainer. More...
 
 CL_String16 (const char *c_str)
 Constructs a StringContainer. More...
 
 CL_String16 (const char *c_str, size_type length)
 Constructs a StringContainer. More...
 
 CL_String16 (const wchar_t *wc_str)
 Constructs a StringContainer. More...
 
 CL_String16 (const wchar_t *wc_str, size_type length)
 Constructs a StringContainer. More...
 
 CL_String16 (size_type n, wchar_t c)
 Constructs a StringContainer. More...
 
 ~CL_String16 ()
 
CL_String16append (const CL_StringData16 &s)
 Append. More...
 
CL_String16append (const CL_StringData16 &s, size_type pos, size_type n)
 Append. More...
 
CL_String16append (const char *s)
 
CL_String16append (const char *s, size_type n)
 Append. More...
 
CL_String16append (const wchar_t *s)
 Append. More...
 
CL_String16append (const wchar_t *s, size_type n)
 Append. More...
 
CL_String16append (size_type n, wchar_t c)
 Append. More...
 
CL_String16assign (const CL_StringData16 &s)
 
CL_String16assign (const CL_StringData16 &s, size_type pos, size_type n)
 Assign. More...
 
CL_String16assign (const wchar_t *s, size_type n)
 Assign. More...
 
CL_String16assign (const wchar_t *s)
 Assign. More...
 
CL_String16assign (size_type n, wchar_t c)
 Assign. More...
 
iterator begin ()
 Begin. More...
 
const_iterator begin () const
 Begin. More...
 
const wchar_t * c_str () const
 
size_type capacity () const
 Capacity. More...
 
void clear ()
 Clear. More...
 
int compare (const CL_StringData16 &s) const
 Compare. More...
 
int compare (size_type pos, size_type n, const CL_StringData16 &s) const
 Compare. More...
 
int compare (size_type pos, size_type n, const CL_StringData16 &s, size_type pos1, size_type n1) const
 Compare. More...
 
int compare (const wchar_t *s) const
 Compare. More...
 
int compare (size_type pos, size_type n, const wchar_t *s, size_type len=npos) const
 Compare. More...
 
size_type copy (wchar_t *buf, size_type n, size_type pos=0) const
 Copy. More...
 
const wchar_t * data () const
 
wchar_t * data ()
 Data. More...
 
bool empty () const
 Empty. More...
 
iterator end ()
 End. More...
 
const_iterator end () const
 End. More...
 
iterator erase (iterator p)
 Erase. More...
 
iterator erase (iterator first, iterator last)
 Erase. More...
 
CL_String16erase (size_type pos=0, size_type n=CL_StringData16::npos)
 Erase. More...
 
size_type find (const CL_StringData16 &s, size_type pos=0) const
 Find. More...
 
size_type find (const wchar_t *s, size_type pos, size_type n) const
 Find. More...
 
size_type find (const wchar_t *s, size_type pos=0) const
 Find. More...
 
size_type find (wchar_t c, size_type pos=0) const
 Find. More...
 
size_type find_first_not_of (const CL_StringData16 &s, size_type pos=0) const
 Find first not of. More...
 
size_type find_first_not_of (const wchar_t *s, size_type pos, size_type n) const
 Find first not of. More...
 
size_type find_first_not_of (const wchar_t *s, size_type pos=0) const
 Find first not of. More...
 
size_type find_first_not_of (wchar_t c, size_type pos=0) const
 Find first not of. More...
 
size_type find_first_of (const CL_StringData16 &s, size_type pos=0) const
 Find first of. More...
 
size_type find_first_of (const wchar_t *s, size_type pos, size_type n) const
 Find first of. More...
 
size_type find_first_of (const wchar_t *s, size_type pos=0) const
 Find first of. More...
 
size_type find_first_of (wchar_t c, size_type pos=0) const
 Find first of. More...
 
size_type find_last_not_of (const CL_StringData16 &s, size_type pos=npos) const
 Find last not of. More...
 
size_type find_last_not_of (const wchar_t *s, size_type pos, size_type n) const
 Find last not of. More...
 
size_type find_last_not_of (const wchar_t *s, size_type pos=npos) const
 Find last not of. More...
 
size_type find_last_not_of (wchar_t c, size_type pos=npos) const
 Find last not of. More...
 
size_type find_last_of (const CL_StringData16 &s, size_type pos=npos) const
 Find last of. More...
 
size_type find_last_of (const wchar_t *s, size_type pos, size_type n) const
 Find last of. More...
 
size_type find_last_of (const wchar_t *s, size_type pos=npos) const
 Find last of. More...
 
size_type find_last_of (wchar_t c, size_type pos=npos) const
 Find last of. More...
 
iterator insert (iterator pos, const wchar_t &item)
 Insert. More...
 
void insert (iterator pos, size_type num_copies, const wchar_t &item)
 Insert. More...
 
CL_String16insert (size_type pos, const CL_StringData16 &s)
 Insert. More...
 
CL_String16insert (size_type pos, const CL_StringData16 &s, size_type pos1, size_type length)
 Insert. More...
 
CL_String16insert (size_type pos, const wchar_t *s)
 Insert. More...
 
CL_String16insert (size_type pos, const wchar_t *s, size_type s_length)
 Insert. More...
 
CL_String16insert (size_type pos, size_type n, wchar_t c)
 Insert. More...
 
size_type length () const
 Length. More...
 
size_type max_size () const
 Max size. More...
 
 operator CL_StringRef16 () const
 std::wstring More...
 
 operator std::wstring () const
 std::wstring More...
 
CL_String16operator+= (const CL_StringData16 &s)
 
CL_String16operator+= (const char *c_str)
 
CL_String16operator+= (const wchar_t *c_str)
 
CL_String16operator+= (wchar_t c)
 
CL_String16operator= (const CL_String16 &source)
 
CL_String16operator= (const CL_StringData16 &source)
 
CL_String16operator= (const char *c_str)
 
CL_String16operator= (const wchar_t *c_str)
 
const wchar_t & operator[] (size_type n) const
 
wchar_t & operator[] (size_type n)
 
void push_back (wchar_t c)
 Push back. More...
 
CL_String16replace (size_type pos, size_type n, const CL_StringData16 &s)
 Replace. More...
 
CL_String16replace (size_type pos, size_type n, const CL_StringData16 &s, size_type pos1, size_type n1)
 Replace. More...
 
CL_String16replace (size_type pos, size_type n, const wchar_t *s, size_type n1)
 Replace. More...
 
CL_String16replace (size_type pos, size_type n, const wchar_t *s)
 Replace. More...
 
CL_String16replace (size_type pos, size_type n, size_type n1, wchar_t c)
 Replace. More...
 
CL_String16replace (iterator first, iterator last, const CL_StringData16 &s)
 Replace. More...
 
CL_String16replace (iterator first, iterator last, const wchar_t *s, size_type n)
 Replace. More...
 
CL_String16replace (iterator first, iterator last, const wchar_t *s)
 Replace. More...
 
CL_String16replace (iterator first, iterator last, size_type n, wchar_t c)
 Replace. More...
 
void reserve (size_type size)
 Reserve. More...
 
void resize (size_type n)
 Resize. More...
 
void resize (size_type n, wchar_t c)
 Resize. More...
 
size_type rfind (const CL_StringData16 &s, size_type pos=npos) const
 Rfind. More...
 
size_type rfind (const wchar_t *s, size_type pos, size_type n) const
 Rfind. More...
 
size_type rfind (const wchar_t *s, size_type pos=npos) const
 Rfind. More...
 
size_type rfind (wchar_t c, size_type pos=npos) const
 Rfind. More...
 
size_type size () const
 Size. More...
 
CL_StringRef16 substr (size_type pos=0, size_type n=npos) const
 Substr. More...
 

Static Public Attributes

static const size_type npos
 

Protected Attributes

size_type data_length
 
wchar_t * data_ptr
 

Detailed Description

String container template.

Basic string container. Extends StringData with operations that work on string data.

Member Typedef Documentation

typedef wchar_t CL_StringData16::char_type
inherited
typedef const wchar_t* CL_StringData16::const_iterator
inherited
typedef wchar_t* CL_StringData16::iterator
inherited
typedef unsigned int CL_StringData16::size_type
inherited

Constructor & Destructor Documentation

CL_String16::CL_String16 ( )
CL_String16::CL_String16 ( const std::wstring &  source)

Constructs a StringContainer.

Parameters
source= Std String
CL_String16::CL_String16 ( const CL_String16 source)

Constructs a StringContainer.

Parameters
source= String Container
CL_String16::CL_String16 ( const CL_StringData16 source)

Constructs a StringContainer.

CL_String16::CL_String16 ( const char *  c_str)

Constructs a StringContainer.

Parameters
c_str= char
CL_String16::CL_String16 ( const char *  c_str,
size_type  length 
)

Constructs a StringContainer.

Parameters
c_str= char
length= size_type
CL_String16::CL_String16 ( const wchar_t *  wc_str)

Constructs a StringContainer.

Parameters
wc_str= wchar_t
CL_String16::CL_String16 ( const wchar_t *  wc_str,
size_type  length 
)

Constructs a StringContainer.

Parameters
wc_str= wchar_t
length= size_type
CL_String16::CL_String16 ( size_type  n,
wchar_t  c 
)

Constructs a StringContainer.

Parameters
n= size_type
c= Char Type
CL_String16::~CL_String16 ( )

Member Function Documentation

CL_String16& CL_String16::append ( const CL_StringData16 s)

Append.

Parameters
s= Text
Returns
String Container
CL_String16& CL_String16::append ( const CL_StringData16 s,
size_type  pos,
size_type  n 
)

Append.

Parameters
s= Text
pos= size_type
n= size_type
Returns
String Container
CL_String16& CL_String16::append ( const char *  s)
CL_String16& CL_String16::append ( const char *  s,
size_type  n 
)

Append.

Parameters
s= char
n= size_type
Returns
String Container
CL_String16& CL_String16::append ( const wchar_t *  s)

Append.

Parameters
s= wchar_t
Returns
String Container
CL_String16& CL_String16::append ( const wchar_t *  s,
size_type  n 
)

Append.

Parameters
s= wchar_t
n= size_type
Returns
String Container
CL_String16& CL_String16::append ( size_type  n,
wchar_t  c 
)

Append.

Parameters
n= size_type
c= Char Type
Returns
String Container
CL_String16& CL_String16::assign ( const CL_StringData16 s)
CL_String16& CL_String16::assign ( const CL_StringData16 s,
size_type  pos,
size_type  n 
)

Assign.

Parameters
s= String Data
pos= size_type
n= size_type
Returns
String Container
CL_String16& CL_String16::assign ( const wchar_t *  s,
size_type  n 
)

Assign.

Parameters
s= Char Type
n= size_type
Returns
String Container
CL_String16& CL_String16::assign ( const wchar_t *  s)

Assign.

Parameters
s= Char Type
Returns
String Container
CL_String16& CL_String16::assign ( size_type  n,
wchar_t  c 
)

Assign.

Parameters
n= size_type
c= Char Type
Returns
String Container
iterator CL_StringData16::begin ( )
inlineinherited

Begin.

Returns
iterator

Referenced by erase(), and insert().

const_iterator CL_StringData16::begin ( ) const
inlineinherited

Begin.

Returns
const_iterator
const wchar_t* CL_String16::c_str ( ) const
size_type CL_String16::capacity ( ) const
inline

Capacity.

Returns
size_type
void CL_String16::clear ( )

Clear.

int CL_StringData16::compare ( const CL_StringData16 s) const
inherited

Compare.

Parameters
s= String Data
Returns
int
int CL_StringData16::compare ( size_type  pos,
size_type  n,
const CL_StringData16 s 
) const
inherited

Compare.

Parameters
pos= size_type
n= size_type
s= String Data
Returns
int
int CL_StringData16::compare ( size_type  pos,
size_type  n,
const CL_StringData16 s,
size_type  pos1,
size_type  n1 
) const
inherited

Compare.

Parameters
pos= size_type
n= size_type
s= String Data
pos1= size_type
n1= size_type
Returns
int
int CL_StringData16::compare ( const wchar_t *  s) const
inherited

Compare.

Parameters
s= Char Type
Returns
int
int CL_StringData16::compare ( size_type  pos,
size_type  n,
const wchar_t *  s,
size_type  len = npos 
) const
inherited

Compare.

Parameters
pos= size_type
n= size_type
s= Char Type
len= size_type
Returns
int
size_type CL_String16::copy ( wchar_t *  buf,
size_type  n,
size_type  pos = 0 
) const

Copy.

Parameters
buf= Char Type
n= size_type
pos= size_type
Returns
size_type
const wchar_t* CL_StringData16::data ( ) const
inlineinherited

Referenced by insert().

wchar_t* CL_StringData16::data ( )
inlineinherited

Data.

Returns
Char Type
bool CL_StringData16::empty ( ) const
inlineinherited

Empty.

Returns
bool
iterator CL_StringData16::end ( )
inlineinherited

End.

Returns
iterator

Referenced by erase().

const_iterator CL_StringData16::end ( ) const
inlineinherited

End.

Returns
const_iterator
iterator CL_String16::erase ( iterator  p)
inline

Erase.

Parameters
p= iterator
Returns
iterator

References CL_StringData16::end().

iterator CL_String16::erase ( iterator  first,
iterator  last 
)
inline

Erase.

Parameters
first= iterator
last= iterator
Returns
iterator

References CL_StringData16::begin(), and CL_StringData16::end().

CL_String16& CL_String16::erase ( size_type  pos = 0,
size_type  n = CL_StringData16::npos 
)

Erase.

Parameters
pos= size_type
n= size_type
Returns
String Container
size_type CL_StringData16::find ( const CL_StringData16 s,
size_type  pos = 0 
) const
inherited

Find.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData16::find ( const wchar_t *  s,
size_type  pos,
size_type  n 
) const
inherited

Find.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData16::find ( const wchar_t *  s,
size_type  pos = 0 
) const
inherited

Find.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find ( wchar_t  c,
size_type  pos = 0 
) const
inherited

Find.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_first_not_of ( const CL_StringData16 s,
size_type  pos = 0 
) const
inherited

Find first not of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData16::find_first_not_of ( const wchar_t *  s,
size_type  pos,
size_type  n 
) const
inherited

Find first not of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData16::find_first_not_of ( const wchar_t *  s,
size_type  pos = 0 
) const
inherited

Find first not of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_first_not_of ( wchar_t  c,
size_type  pos = 0 
) const
inherited

Find first not of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_first_of ( const CL_StringData16 s,
size_type  pos = 0 
) const
inherited

Find first of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData16::find_first_of ( const wchar_t *  s,
size_type  pos,
size_type  n 
) const
inherited

Find first of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData16::find_first_of ( const wchar_t *  s,
size_type  pos = 0 
) const
inherited

Find first of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_first_of ( wchar_t  c,
size_type  pos = 0 
) const
inherited

Find first of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_last_not_of ( const CL_StringData16 s,
size_type  pos = npos 
) const
inherited

Find last not of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData16::find_last_not_of ( const wchar_t *  s,
size_type  pos,
size_type  n 
) const
inherited

Find last not of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData16::find_last_not_of ( const wchar_t *  s,
size_type  pos = npos 
) const
inherited

Find last not of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_last_not_of ( wchar_t  c,
size_type  pos = npos 
) const
inherited

Find last not of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_last_of ( const CL_StringData16 s,
size_type  pos = npos 
) const
inherited

Find last of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData16::find_last_of ( const wchar_t *  s,
size_type  pos,
size_type  n 
) const
inherited

Find last of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData16::find_last_of ( const wchar_t *  s,
size_type  pos = npos 
) const
inherited

Find last of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::find_last_of ( wchar_t  c,
size_type  pos = npos 
) const
inherited

Find last of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
iterator CL_String16::insert ( iterator  pos,
const wchar_t &  item 
)
inline

Insert.

Parameters
pos= iterator
item= Char Type
Returns
iterator

References CL_StringData16::begin(), CL_StringData16::data(), and CL_StringData16::length().

void CL_String16::insert ( iterator  pos,
size_type  num_copies,
const wchar_t &  item 
)

Insert.

Parameters
pos= iterator
num_copies= size_type
item= Char Type
CL_String16& CL_String16::insert ( size_type  pos,
const CL_StringData16 s 
)

Insert.

Parameters
pos= size_type
s= Text
Returns
String Container
CL_String16& CL_String16::insert ( size_type  pos,
const CL_StringData16 s,
size_type  pos1,
size_type  length 
)

Insert.

Parameters
pos= size_type
s= String Data
pos1= size_type
length= size_type
Returns
String Container
CL_String16& CL_String16::insert ( size_type  pos,
const wchar_t *  s 
)

Insert.

Parameters
pos= size_type
s= Char Type
Returns
String Container
CL_String16& CL_String16::insert ( size_type  pos,
const wchar_t *  s,
size_type  s_length 
)

Insert.

Parameters
pos= size_type
s= Char Type
s_length= size_type
Returns
String Container
CL_String16& CL_String16::insert ( size_type  pos,
size_type  n,
wchar_t  c 
)

Insert.

Parameters
pos= size_type
n= size_type
c= Char Type
Returns
String Container
size_type CL_StringData16::length ( ) const
inlineinherited

Length.

Returns
size_type

Referenced by insert().

size_type CL_String16::max_size ( ) const
inline

Max size.

Returns
size_type
CL_String16::operator CL_StringRef16 ( ) const

std::wstring

Returns
operator
CL_StringData16::operator std::wstring ( ) const
inherited

std::wstring

Returns
operator
CL_String16& CL_String16::operator+= ( const CL_StringData16 s)
CL_String16& CL_String16::operator+= ( const char *  c_str)
CL_String16& CL_String16::operator+= ( const wchar_t *  c_str)
CL_String16& CL_String16::operator+= ( wchar_t  c)
CL_String16& CL_String16::operator= ( const CL_String16 source)
CL_String16& CL_String16::operator= ( const CL_StringData16 source)
CL_String16& CL_String16::operator= ( const char *  c_str)
CL_String16& CL_String16::operator= ( const wchar_t *  c_str)
const wchar_t& CL_StringData16::operator[] ( size_type  n) const
inlineinherited
wchar_t& CL_StringData16::operator[] ( size_type  n)
inlineinherited
void CL_String16::push_back ( wchar_t  c)

Push back.

Parameters
c= Char Type
CL_String16& CL_String16::replace ( size_type  pos,
size_type  n,
const CL_StringData16 s 
)

Replace.

Parameters
pos= size_type
n= size_type
s= Text
Returns
String Container
CL_String16& CL_String16::replace ( size_type  pos,
size_type  n,
const CL_StringData16 s,
size_type  pos1,
size_type  n1 
)

Replace.

Parameters
pos= size_type
n= size_type
s= Text
pos1= size_type
n1= size_type
Returns
String Container
CL_String16& CL_String16::replace ( size_type  pos,
size_type  n,
const wchar_t *  s,
size_type  n1 
)

Replace.

Parameters
pos= size_type
n= size_type
s= Char Type
n1= size_type
Returns
String Container
CL_String16& CL_String16::replace ( size_type  pos,
size_type  n,
const wchar_t *  s 
)

Replace.

Parameters
pos= size_type
n= size_type
s= Char Type
Returns
String Container
CL_String16& CL_String16::replace ( size_type  pos,
size_type  n,
size_type  n1,
wchar_t  c 
)

Replace.

Parameters
pos= size_type
n= size_type
n1= size_type
c= Char Type
Returns
String Container
CL_String16& CL_String16::replace ( iterator  first,
iterator  last,
const CL_StringData16 s 
)

Replace.

Parameters
first= iterator
last= iterator
s= Text
Returns
String Container
CL_String16& CL_String16::replace ( iterator  first,
iterator  last,
const wchar_t *  s,
size_type  n 
)

Replace.

Parameters
first= iterator
last= iterator
s= Char Type
n= size_type
Returns
String Container
CL_String16& CL_String16::replace ( iterator  first,
iterator  last,
const wchar_t *  s 
)

Replace.

Parameters
first= iterator
last= iterator
s= Char Type
Returns
String Container
CL_String16& CL_String16::replace ( iterator  first,
iterator  last,
size_type  n,
wchar_t  c 
)

Replace.

Parameters
first= iterator
last= iterator
n= size_type
c= Char Type
Returns
String Container
void CL_String16::reserve ( size_type  size)

Reserve.

Parameters
size= size_type
void CL_String16::resize ( size_type  n)

Resize.

Parameters
n= size_type
void CL_String16::resize ( size_type  n,
wchar_t  c 
)

Resize.

Parameters
n= size_type
c= Char Type
size_type CL_StringData16::rfind ( const CL_StringData16 s,
size_type  pos = npos 
) const
inherited

Rfind.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData16::rfind ( const wchar_t *  s,
size_type  pos,
size_type  n 
) const
inherited

Rfind.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData16::rfind ( const wchar_t *  s,
size_type  pos = npos 
) const
inherited

Rfind.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::rfind ( wchar_t  c,
size_type  pos = npos 
) const
inherited

Rfind.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData16::size ( ) const
inlineinherited

Size.

Returns
size_type
CL_StringRef16 CL_StringData16::substr ( size_type  pos = 0,
size_type  n = npos 
) const
inherited

Substr.

Parameters
pos= size_type
n= size_type
Returns
Reference Class

Member Data Documentation

size_type CL_StringData16::data_length
mutableprotectedinherited
wchar_t* CL_StringData16::data_ptr
mutableprotectedinherited
const size_type CL_StringData16::npos
staticinherited

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