DOMString Class Reference
from PyKDE4.khtml import *
Namespace: DOM
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().
Methods |
| __init__ (self) |
| __init__ (self, QChar str, long len) |
| __init__ (self, QString a0) |
| __init__ (self, QString str) |
| __init__ (self, QString str, long len) |
| __init__ (self, DOMStringImpl i) |
| __init__ (self, DOM.DOMString str) |
QChar | characters (self) |
DOM.DOMString | copy (self) |
bool | endsWith (self, DOM.DOMString str) |
int | find (self, QChar c, int start=0) |
DOMStringImpl | implementation (self) |
| insert (self, DOM.DOMString str, long pos) |
bool | isEmpty (self) |
bool | isNull (self) |
long | length (self) |
DOM.DOMString | lower (self) |
DOM.DOMString | operator + (self, DOM.DOMString str) |
DOM.DOMString | operator += (self, DOM.DOMString str) |
QChar | operator [] (self, long i) |
bool, int (_percentage) | percentage (self, ) |
| remove (self, long pos, int len=1) |
int | reverseFind (self, QChar c, int start=-1) |
DOM.DOMString | split (self, long pos) |
bool | startsWith (self, DOM.DOMString str) |
QString | string (self) |
DOM.DOMString | substring (self, unsigned pos, unsigned len=UINT_MAX) |
float, bool (ok) | toFloat (self, ) |
int | toInt (self) |
int, bool (ok) | toInt (self, ) |
| truncate (self, long len) |
QChar | unicode (self) |
DOM.DOMString | upper (self) |
Static Methods |
DOM.DOMString | format (QString format, ... a0) |
DOM.DOMString | number (float f) |
Method Documentation
default constructor. Gives an empty DOMString
__init__ |
( |
self, |
|
|
|
QChar |
str, |
|
|
long |
len |
|
) |
|
|
|
__init__ |
( |
self, |
|
|
|
QString |
str, |
|
|
long |
len |
|
) |
|
|
|
__init__ |
( |
self, |
|
|
|
DOMStringImpl |
i |
|
) |
|
|
|
QChar characters |
( |
|
self ) |
|
int find |
( |
self, |
|
|
|
QChar |
c, |
|
|
int |
start=0 |
|
) |
|
|
|
DOMStringImpl implementation |
( |
|
self ) |
|
- Internal:
- get a handle to the imlementation of the DOMString
Use at own risk!!!
Returns a lowercase version of the string
append str to this string
QChar operator [] |
( |
self, |
|
|
|
long |
i |
|
) |
|
|
|
The character at position i of the DOMString. If i >= length(), the
character returned will be 0.
bool, int (_percentage) percentage |
( |
self, |
|
|
) |
|
|
|
remove |
( |
self, |
|
|
|
long |
pos, |
|
|
int |
len=1 |
|
) |
|
|
|
int reverseFind |
( |
self, |
|
|
|
QChar |
c, |
|
|
int |
start=-1 |
|
) |
|
|
|
Splits the string into two. The original string gets truncated to pos, and the rest is returned.
DOM.DOMString substring |
( |
self, |
|
|
|
unsigned |
pos, |
|
|
unsigned |
len=UINT_MAX |
|
) |
|
|
|
float, bool (ok) toFloat |
( |
self, |
|
|
) |
|
|
|
int, bool (ok) toInt |
( |
self, |
|
|
) |
|
|
|
truncate |
( |
self, |
|
|
|
long |
len |
|
) |
|
|
|
Returns an uppercase version of the string