KDE 4.1 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

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, 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)
DOM.DOMString split (self, long pos)
QString string (self)
float toFloat (self, bool ok=0)
int toInt (self)
int toInt (self, bool ok)
 truncate (self, long len)
QChar unicode (self)
DOM.DOMString upper (self)

Static Methods

DOM.DOMString number (float f)

Method Documentation

__init__ (   self )

default constructor. Gives an empty DOMString

__init__ (  self,
QChar  str,
long  len
)
__init__ (  self,
QString  a0
)
__init__ (  self,
QString  str
)
__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 )

Internal:
get a handle to the imlementation of the DOMString Use at own risk!!!

insert (  self,
DOM.DOMString  str,
long  pos
)
bool isEmpty (   self )
bool isNull (   self )
long length (   self )
DOM.DOMString lower (   self )

Returns a lowercase version of the string

DOM.DOMString number ( float  f
)
DOM.DOMString operator + (  self,
DOM.DOMString  str
)

add two DOMString's

DOM.DOMString operator += (  self,
DOM.DOMString  str
)

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
)
DOM.DOMString split (  self,
long  pos
)

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

QString string (   self )
float toFloat (  self,
bool  ok=0
)
int toInt (   self )
int toInt (  self,
bool  ok
)
truncate (  self,
long  len
)
QChar unicode (   self )
DOM.DOMString upper (   self )

Returns an uppercase version of the string

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal