KHTML
Go to the documentation of this file.
22#ifndef _DOM_DOMString_h_
23#define _DOM_DOMString_h_
27#include <QtCore/QString>
45 friend class CharacterDataImpl;
83 const QChar &operator [](
unsigned int i)
const;
85 int find(
const QChar c,
int start = 0)
const;
86 int reverseFind(
const QChar c,
int start = -1)
const;
88 DOMString substring(
unsigned pos,
unsigned len = UINT_MAX)
const;
91 void truncate(
unsigned int len );
92 void remove(
unsigned int pos,
int len=1);
107 QChar *unicode()
const;
110 QString string()
const;
113 int toInt(
bool* ok)
const;
114 float toFloat(
bool* ok = 0)
const;
115 bool percentage(
int &_percentage)
const;
121 bool isNull()
const {
return (impl == 0); }
122 bool isEmpty()
const;
124 bool endsWith(
const DOMString& str)
const;
125 bool startsWith(
const DOMString& str)
const;
139#ifndef KDE_NO_DEPRECATED
140 KDE_DEPRECATED
DOMString trimSpaces()
const;
149 static DOMString format(
const char* format, ...)
151 __attribute__ ((format (printf, 1, 2)))
160 return (stream << (
string.implementation() ?
string.
string() : QString::fromLatin1(
"null")));
163KHTML_EXPORT
bool operator==(
const DOMString &a,
const DOMString &b );
164KHTML_EXPORT
bool operator==(
const DOMString &a,
const QString &b );
165KHTML_EXPORT
bool operator==(
const DOMString &a,
const char *b );
172KHTML_EXPORT
bool strcasecmp(
const DOMString &a,
const DOMString &b );
173KHTML_EXPORT
bool strcasecmp(
const DOMString& a,
const char* b );
This class implements the basic string we use in the DOM.
DOMString()
default constructor.
QChar * characters() const
DOMStringImpl * implementation() const
friend bool operator==(const DOMString &a, const char *b)
This library provides a full-featured HTML parser and widget.
bool operator!=(const DOMString &a, const DOMString &b)
bool operator==(const DOMString &a, const DOMString &b)
QDebug operator<<(QDebug stream, const DOMString &string)
bool strcasecmp(const DOMString &a, const DOMString &b)
bool strcmp(const DOMString &a, const DOMString &b)
QString number(KIO::filesize_t size)
KAction * copy(const QObject *recvr, const char *slot, QObject *parent)
KAction * find(const QObject *recvr, const char *slot, QObject *parent)
const KShortcut & insert()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by
doxygen 1.9.6 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.