UniString

A universal string containing string data and information about its encoding.

Constructors

this
this(T s)

Creates an instance from an encoded string.

this
this(string encoding, ubyte[] s)

Creates an instance by encoding name and byte representaion.

Members

Functions

getEncodingName
string getEncodingName()

Returns name of current encoding.

getRawData
ubyte[] getRawData()

Returns a current string as a byte array.

recode
void recode()

Recodes current data of this UniString object into a new encoding by the string type passed as template parameter.

recode
void recode(string encodingName)

Recodes current data of this UniString object to new encoding in runtime.

toEncodedString
T toEncodedString()

Returns string of specified encoding by data type in compile time.

toEncodedString
ubyte[] toEncodedString(string encodingName)

Returns string as byte array of specified encoding by data type.

toString
string toString()

Returns UTF-8 string represenation.

Variables

encodingName
string encodingName;

Name of string encoding.

str
ubyte[] str;

Byte string representation.

Meta