Home | Modules | Class Hierarchy | Alphabetical List | Compound List | Related Pages

DString Class Reference
[Unicode core]

Inheritance diagram for DString:

String

Detailed Description

Dynamic string class.

Simple unicode wrapper over any other source.


Public Member Functions

DStringoperator= (const DString &cstring)
 String clone operator.
 DString (const byte *stream, int size, int def_encoding=-1)
 Creates string from byte stream with encoding autodetecting.
 DString (const char *string, int s=0, int l=-1, int encoding=-1)
 String from single-byte character buffer.
 DString (const wchar *string, int s=0, int l=-1)
 String from unicode two-byte character buffer.
 DString (const w4char *string, int s=0, int l=-1)
 String from UCS4 four-byte character buffer.
 DString (const String *cstring, int s=0, int l=-1)
 String from any String implementing interface.
 DString (const String &cstring, int s=0, int l=-1)
 String from any String implementing interface.
 DString ()
 Empty String.
wchar operator[] (int i) const
int length () const
Stringsubstring (int s, int l=-1) const
 Creates Dynamic string as substring of called object.

Protected Types

enum  EStreamType {
  ST_CHAR = 0, ST_UTF16, ST_UTF16_BE, ST_CSTRING,
  ST_UTF8, ST_UTF32, ST_UTF32_BE
}

Protected Attributes

EStreamType type
int encodingIdx
int start
int len
const char * str
const wchar * wstr
const w4char * w4str
const Stringcstr
wchar * stream_wstr


Constructor & Destructor Documentation

DString::DString const byte *  stream,
int  size,
int  def_encoding = -1
 

Creates string from byte stream with encoding autodetecting.

Parameters:
stream Input raw byte stream, can't be null.
size Size of input buffer
def_encoding Default encoding to be used, if no other variants found.

DString::DString const char *  string,
int  s = 0,
int  l = -1,
int  encoding = -1
 

String from single-byte character buffer.

Parameters:
string Character buffer, can't be null.
s Start string position. Zero - create from start of buffer.
l Length of created string. If -1, autodetects string length with last zero byte.
encoding Encoding, to use for char2unicode transformations. If -1, default encoding will be used.

DString::DString const wchar *  string,
int  s = 0,
int  l = -1
 

String from unicode two-byte character buffer.

Parameters:
string Unicode character buffer, can't be null.
s Start string position. Zero - create from start of buffer.
l Length of created string. If -1, autodetects string length with last zero char.

DString::DString const w4char *  string,
int  s = 0,
int  l = -1
 

String from UCS4 four-byte character buffer.

Parameters:
string UCS4 unicode character buffer, can't be null.
s Starting string position. Zero - create from start of buffer.
l Length of created string. If -1, autodetects string length with last zero char.

DString::DString const String cstring,
int  s = 0,
int  l = -1
 

String from any String implementing interface.

Parameters:
cstring String class instance, can't be null.
s Starting string position.
l Length of created string. If -1, autodetects string length with cstring.length() call.

DString::DString const String cstring,
int  s = 0,
int  l = -1
 

String from any String implementing interface.

Parameters:
cstring String class instance.
s Starting string position.
l Length of created string. If -1, autodetects string length with cstring.length() call.


Member Function Documentation

String* DString::substring int  s,
int  l = -1
const
 

Creates Dynamic string as substring of called object.

Parameters:
s Starting string position.
l Length of created string. If -1, creates string till end of current.


Colorer-take5 Library. Copyright © 1999-2006 Igor Russkih.
Generated at Fri Nov 24 17:13:12 2006 by doxygen 1.4.6.