• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

  • DOM
  • DOMString
Public Member Functions | Protected Attributes | Friends | List of all members
DOM::DOMString Class Reference

#include <dom_string.h>

Public Member Functions

 DOMString ()
 DOMString (const TQChar *str, uint len)
 DOMString (const TQString &)
 DOMString (const char *str)
 DOMString (DOMStringImpl *i)
 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 TQChar & operator[] (unsigned int i) const
int find (const TQChar 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
TQChar * unicode () const
TQString string () const
int toInt () const
bool percentage (int &_percentage) const
DOMString copy () const
bool isNull () const
bool isEmpty () const
DOMStringImpl * implementation () const

Protected Attributes

DOMStringImpl * impl

Friends

class CharacterDataImpl
TDEHTML_EXPORT bool operator== (const DOMString &a, const char *b)

Detailed Description

This class implements the basic string we use in the DOM.

We do not use TQString 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().

Definition at line 43 of file dom_string.h.

Constructor & Destructor Documentation

◆ DOMString() [1/6]

DOM::DOMString::DOMString ( )
inline

default constructor.

Gives an empty DOMString

Definition at line 51 of file dom_string.h.

◆ DOMString() [2/6]

DOMString::DOMString ( const TQChar * str,
uint len )

Definition at line 29 of file dom_string.cpp.

◆ DOMString() [3/6]

DOMString::DOMString ( const TQString & str)

Definition at line 35 of file dom_string.cpp.

◆ DOMString() [4/6]

DOMString::DOMString ( const char * str)

Definition at line 46 of file dom_string.cpp.

◆ DOMString() [5/6]

DOMString::DOMString ( DOMStringImpl * i)

Definition at line 57 of file dom_string.cpp.

◆ ~DOMString()

DOMString::~DOMString ( )
virtual

Definition at line 69 of file dom_string.cpp.

◆ DOMString() [6/6]

DOMString::DOMString ( const DOMString & str)

Definition at line 63 of file dom_string.cpp.

Member Function Documentation

◆ copy()

DOMString DOMString::copy ( ) const

Definition at line 216 of file dom_string.cpp.

◆ find()

int DOMString::find ( const TQChar c,
int start = 0 ) const

Definition at line 139 of file dom_string.cpp.

◆ implementation()

DOMStringImpl * DOM::DOMString::implementation ( ) const
inline

Definition at line 115 of file dom_string.h.

◆ insert()

void DOMString::insert ( DOMString str,
uint pos )

Definition at line 118 of file dom_string.cpp.

◆ isEmpty()

bool DOMString::isEmpty ( ) const

Definition at line 255 of file dom_string.cpp.

◆ isNull()

bool DOM::DOMString::isNull ( ) const
inline

Definition at line 108 of file dom_string.h.

◆ length()

uint DOMString::length ( ) const

Definition at line 151 of file dom_string.cpp.

◆ lower()

DOMString DOMString::lower ( ) const

Returns a lowercase version of the string.

Definition at line 173 of file dom_string.cpp.

◆ operator+()

DOMString DOMString::operator+ ( const DOMString & str)

add two DOMString's

Definition at line 105 of file dom_string.cpp.

◆ operator+=()

DOMString & DOMString::operator+= ( const DOMString & str)

append str to this string

Definition at line 84 of file dom_string.cpp.

◆ operator=()

DOMString & DOMString::operator= ( const DOMString & str)

Definition at line 74 of file dom_string.cpp.

◆ operator[]()

const TQChar & DOMString::operator[] ( unsigned int i) const

The character at position i of the DOMString.

If i >= length(), the character returned will be 0.

Definition at line 130 of file dom_string.cpp.

◆ percentage()

bool DOMString::percentage ( int & _percentage) const

Definition at line 185 of file dom_string.cpp.

◆ remove()

void DOMString::remove ( unsigned int pos,
int len = 1 )

Definition at line 162 of file dom_string.cpp.

◆ split()

DOMString DOMString::split ( unsigned int pos)

Splits the string into two.

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

Definition at line 167 of file dom_string.cpp.

◆ string()

TQString DOMString::string ( ) const

Definition at line 202 of file dom_string.cpp.

◆ toInt()

int DOMString::toInt ( ) const

Definition at line 209 of file dom_string.cpp.

◆ truncate()

void DOMString::truncate ( unsigned int len)

Definition at line 157 of file dom_string.cpp.

◆ unicode()

TQChar * DOMString::unicode ( ) const

Definition at line 196 of file dom_string.cpp.

◆ upper()

DOMString DOMString::upper ( ) const

Returns an uppercase version of the string.

Definition at line 179 of file dom_string.cpp.

Friends And Related Symbol Documentation

◆ CharacterDataImpl

friend class CharacterDataImpl
friend

Definition at line 45 of file dom_string.h.

Member Data Documentation

◆ impl

DOMStringImpl* DOM::DOMString::impl
protected

Definition at line 118 of file dom_string.h.


The documentation for this class was generated from the following files:
  • dom_string.h
  • dom_string.cpp

tdehtml

Skip menu "tdehtml"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.15.0
This website is maintained by Timothy Pearson.