Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

com::Utf8StrFmtVA Class Reference

#include <string.h>

Inheritance diagram for com::Utf8StrFmtVA:

com::Utf8StrFmt com::Utf8Str

List of all members.

Detailed Description

This class is a vprintf-like formatter for Utf8Str strings. It is identical to Utf8StrFmt except that its constructor takes a va_list argument instead of ellipsis.

Note that a separate class is necessary because va_list is defined as |char *| on most platforms. For this reason, if we had two overloaded constructors in Utf8StrFmt (one taking ellipsis and another one taking va_list) then composing a constructor call using exactly two |char *| arguments would cause the compiler to use the va_list overload instead of the ellipsis one which is obviously wrong. The compiler would choose va_list because ellipsis has the lowest rank when it comes to resolving overloads, as opposed to va_list which is an exact match for |char *|.

Definition at line 828 of file string.h.

Public Types

enum  CaseSensitivity { CaseSensitive, CaseInsensitive }
typedef const char * ConstString
typedef char * String

Public Member Functions

Utf8Stralloc (size_t aSize)
void append (const Utf8Str &that)
char ** asOutParam ()
const char * c_str () const
const Utf8StrcloneTo (BSTR *pstr) const
const Utf8StrcloneTo (char **pstr) const
int compare (const Utf8Str &that, CaseSensitivity cs=CaseSensitive) const
int compare (const char *pcsz, CaseSensitivity cs=CaseSensitive) const
bool contains (const Utf8Str &that, CaseSensitivity cs=CaseSensitive) const
Utf8StrdetachTo (char **pstr)
bool endsWith (const Utf8Str &that, CaseSensitivity cs=CaseSensitive) const
size_t find (const char *pcszFind, size_t pos=0) const
bool isEmpty () const
bool isNull () const
size_t length () const
char * mutableRaw ()
 operator bool () const
 operator const char * () const
bool operator!= (const char *that) const
bool operator!= (const Utf8Str &that) const
bool operator< (const char *that) const
bool operator< (const Utf8Str &that) const
bool operator== (const char *that) const
bool operator== (const Utf8Str &that) const
const char * raw () const
Utf8StrsetNull ()
Utf8StrsetNullIfEmpty ()
bool startsWith (const Utf8Str &that, CaseSensitivity cs=CaseSensitive) const
Utf8Str substr (size_t pos=0, size_t n=npos) const
int toInt (uint32_t &i) const
int toInt (uint64_t &i) const
int toInt32 () const
int64_t toInt64 () const
Utf8StrtoLower ()
int toUInt32 () const
uint64_t toUInt64 () const
Utf8StrtoUpper ()
 Utf8StrFmtVA (const char *format, va_list args)

Static Public Attributes

static const size_t npos = (size_t)-1
static const Utf8Str Null

Protected Member Functions

void init (const char *format, va_list args)
void safe_assign (const char *s)

Static Protected Member Functions

static void raw_copy (char *&ls, CBSTR rs)
static void raw_copy (char *&ls, const char *rs)

Protected Attributes

char * str


class Bstr

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

Generated by  Doxygen 1.6.0   Back to index