class DOMString

# class DOMString | This class implements the basic string we use in the DOM. More...
Full name | `DOM::DOMString`
Definition | `#include <dom_string.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- DOMString ()
- DOMString (const QChar *str, uint len)
- DOMString (const QString &)
- DOMString (const char *str)
- DOMString (DOMStringImpl *i)
- virtual ~DOMString ()
- DOMString (const DOMString &str)
- DOMString & operator = (const DOMString &str)
- DOMString & operator += (const DOMString &str)
- DOMString operator + (const DOMString &str)
- void insert (DOMString str, uint pos)
- const QChar & operator [] (unsigned int i) const
- int find (const QChar c, int start = 0) const
- uint length () const
- void truncate ( unsigned int len )
- void remove (unsigned int pos, int len=1)
- DOMString split (unsigned int pos)
- DOMString lower () const
- DOMString upper () const
- QChar * unicode () const
- QString string () const
- int toInt () const
- bool percentage (int &_percentage) const
- DOMString copy () const
- bool isNull () const
- bool isEmpty () const
- DOMStringImpl * implementation () const

#### Protected Members

- DOMStringImpl *impl

## Detailed Description

This class implements the basic string we use in the DOM. We do not use QString for 2 reasons: Memory overhead, and the missing explicit sharing of strings we need for the DOM.

All DOMStrings are explicitly shared (they behave like pointers), meaning that modifications to one instance will also modify all others. If you wish to get a DOMString that is independent, use copy().

DOMString () | ### DOMString

default constructor. Gives an empty DOMString

DOMString (const QChar *str, uint len) | ### DOMString

DOMString (const QString &) | ### DOMString

DOMString (const char *str) | ### DOMString

DOMString (DOMStringImpl *i) | ### DOMString

~DOMString () | ### ~DOMString

[virtual]

DOMString (const DOMString &str) | ### DOMString

DOMString & operator = (const DOMString &str) | ### operator =

DOMString & operator += (const DOMString &str) | ### operator +=

append str to this string

DOMString operator + (const DOMString &str) | ### operator +

add two DOMString's

void insert (DOMString str, uint pos) | ### insert

const QChar & operator [] (unsigned int i) | ### operator []

[const]

The character at position i of the DOMString. If i >= length(), the character returned will be 0.

int find (const QChar c, int start = 0) | ### find

[const]

uint length () | ### length

[const]

void truncate ( unsigned int len ) | ### truncate

void remove (unsigned int pos, int len=1) | ### remove

DOMString split (unsigned int pos) | ### split

Splits the string into two. The original string gets truncated to pos, and the rest is returned.

DOMString lower () | ### lower

[const]

Returns a lowercase version of the string

DOMString upper () | ### upper

[const]

Returns an uppercase version of the string

QChar * unicode () | ### unicode

[const]

QString string () | ### string

[const]

int toInt () | ### toInt

[const]

bool percentage (int &_percentage) | ### percentage

[const]

DOMString copy () | ### copy

[const]

bool isNull () | ### isNull

[const]

bool isEmpty () | ### isEmpty

[const]

DOMStringImpl * implementation () | ### implementation

[const]

Use at own risk!!!

DOMStringImpl * impl | ### impl

[protected]

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:37:43 2003, using kdoc 2.0a54.