LMMS
Loading...
Searching...
No Matches
Steinberg::UString Class Reference

#include <ustring.h>

Inheritance diagram for Steinberg::UString:
Steinberg::UStringBuffer< 128 > Steinberg::UStringBuffer< 256 > Steinberg::UStringBuffer< maxSize >

Public Member Functions

 UString (char16 *buffer, int32 size)
int32 getSize () const
 operator const char16 * () const
int32 getLength () const
UStringassign (const char16 *src, int32 srcSize=-1)
UStringappend (const char16 *src, int32 srcSize=-1)
const UStringcopyTo (char16 *dst, int32 dstSize) const
UStringfromAscii (const char *src, int32 srcSize=-1)
UStringassign (const char *src, int32 srcSize=-1)
const UStringtoAscii (char *dst, int32 dstSize) const
bool scanInt (int64 &value) const
bool printInt (int64 value)
bool scanFloat (double &value) const
bool printFloat (double value, int32 precision=4)

Protected Attributes

char16thisBuffer
int32 thisSize
 size in code unit (not in byte!)

Detailed Description

UTF-16 string class without buffer management. Note: that some characters are encoded in 2 UTF16 code units (surrogate pair), this means that getLength returns the number of code unit, not the count of character!

Constructor & Destructor Documentation

◆ UString()

Steinberg::UString::UString ( char16 * buffer,
int32 size )
inline

Construct from UTF-16 string, size is in code unit (count of char16)

Member Function Documentation

◆ append()

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

Append UTF-16 buffer (srcSize is in code unit (count of char16)).

◆ assign() [1/2]

UString & Steinberg::UString::assign ( const char * src,
int32 srcSize = -1 )
inline

◆ assign() [2/2]

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

Copy from UTF-16 buffer (srcSize is in code unit (count of char16)).

◆ copyTo()

const UString & Steinberg::UString::copyTo ( char16 * dst,
int32 dstSize ) const

Copy to UTF-16 buffer (dstSize is in code unit (count of char16)).

◆ fromAscii()

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

Copy from ASCII string (srcSize is in code unit (count of char16)).

◆ getLength()

int32 Steinberg::UString::getLength ( ) const

Returns length of string (in code unit). Note this is not the count of character!

◆ getSize()

int32 Steinberg::UString::getSize ( ) const
inline

returns buffer size

◆ operator const char16 *()

Steinberg::UString::operator const char16 * ( ) const
inline

cast to char16*

◆ printFloat()

bool Steinberg::UString::printFloat ( double value,
int32 precision = 4 )

Print float to string.

◆ printInt()

bool Steinberg::UString::printInt ( int64 value)

Print integer to string.

◆ scanFloat()

bool Steinberg::UString::scanFloat ( double & value) const

Scan float from string.

◆ scanInt()

bool Steinberg::UString::scanInt ( int64 & value) const

Scan integer from string.

◆ toAscii()

const UString & Steinberg::UString::toAscii ( char * dst,
int32 dstSize ) const

Copy to ASCII string.

Member Data Documentation

◆ thisBuffer

char16* Steinberg::UString::thisBuffer
protected

◆ thisSize

int32 Steinberg::UString::thisSize
protected

size in code unit (not in byte!)


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