UString Class Reference

UTF-16 string class without buffer management. More...

#include <ustring.h>

Inheritance diagram for UString:
Inheritance graph
[legend]

Public Member Functions

 UString (char16 *buffer, int32 size)
int32 getSize () const
 returns buffer size
 operator const char16 * () const
 cast to char16*
int32 getLength () const
 Returns length of string (in code units).
UStringassign (const char16 *src, int32 srcSize=-1)
 Copy from UTF-16 buffer.
UStringappend (const char16 *src, int32 srcSize=-1)
 Append UTF-16 buffer.
const UStringcopyTo (char16 *dst, int32 dstSize) const
 Copy to UTF-16 buffer.
UStringfromAscii (const char *src, int32 srcSize=-1)
 Copy from ASCII string.
UStringassign (const char *src, int32 srcSize=-1)
const UStringtoAscii (char *dst, int32 dstSize) const
 Copy to ASCII string.
bool scanInt (int64 &value) const
 Scan integer from string.
bool printInt (int64 value)
 Print integer to string.
bool scanFloat (double &value) const
 Scan float from string.
bool printFloat (double value, int32 precision=4)
 Print float to string.

Protected Attributes

char16thisBuffer
int32 thisSize

Detailed Description

UTF-16 string class without buffer management.


Constructor & Destructor Documentation

UString ( char16 buffer,
int32  size 
) [inline]

Member Function Documentation

int32 getSize (  )  const [inline]

returns buffer size

operator const char16 * (  )  const [inline]

cast to char16*

int32 getLength (  )  const

Returns length of string (in code units).

UString & assign ( const char16 src,
int32  srcSize = -1 
)

Copy from UTF-16 buffer.

UString & append ( const char16 src,
int32  srcSize = -1 
)

Append UTF-16 buffer.

const UString & copyTo ( char16 dst,
int32  dstSize 
) const

Copy to UTF-16 buffer.

UString & fromAscii ( const char src,
int32  srcSize = -1 
)

Copy from ASCII string.

UString& assign ( const char src,
int32  srcSize = -1 
) [inline]
const UString & toAscii ( char dst,
int32  dstSize 
) const

Copy to ASCII string.

bool scanInt ( int64 value  )  const

Scan integer from string.

bool printInt ( int64  value  ) 

Print integer to string.

bool scanFloat ( double &  value  )  const

Scan float from string.

bool printFloat ( double  value,
int32  precision = 4 
)

Print float to string.


Field Documentation

char16* thisBuffer [protected]
int32 thisSize [protected]
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Empty

Copyright ©2013 Steinberg Media Technologies GmbH. All Rights Reserved.