KHtml
22 #ifndef _DOM_DOMString_h_
23 #define _DOM_DOMString_h_
25 #include <khtml_export.h>
26 #include "khtml_debug.h"
46 friend class CharacterDataImpl;
47 friend KHTML_EXPORT
bool operator==(
const DOMString &a,
const char *b);
84 const QChar &operator [](
unsigned int i)
const;
87 int reverseFind(
const QChar c,
int start = -1)
const;
89 DOMString substring(
unsigned pos,
unsigned len = UINT_MAX)
const;
92 void truncate(
unsigned int len);
93 void remove(
unsigned int pos,
int len = 1);
108 QChar *unicode()
const;
110 inline QChar *characters()
const
117 int toInt(
bool *ok)
const;
118 float toFloat(
bool *ok =
nullptr)
const;
119 bool percentage(
int &_percentage)
const;
121 static DOMString number(
float f);
123 DOMString copy()
const;
127 return (impl ==
nullptr);
129 bool isEmpty()
const;
131 bool endsWith(
const DOMString &str)
const;
132 bool startsWith(
const DOMString &str)
const;
139 DOMString trimSpaces()
const;
150 static DOMString format(
const char *format, ...)
151 #if defined(__GNUC__)
152 __attribute__((format(printf, 1, 2)))
162 return (stream << (
string.implementation() ?
string.
string() :
QString::fromLatin1(
"null")));
165 KHTML_EXPORT
bool operator==(
const DOMString &a,
const DOMString &b);
167 KHTML_EXPORT
bool operator==(
const DOMString &a,
const char *b);
168 inline bool operator!=(
const DOMString &a,
const DOMString &b)
176 inline bool operator!=(
const DOMString &a,
const char *b)
180 inline bool strcmp(
const DOMString &a,
const DOMString &b)
186 KHTML_EXPORT
bool strcasecmp(
const DOMString &a,
const DOMString &b);
187 KHTML_EXPORT
bool strcasecmp(
const DOMString &a,
const char *b);
DOMString()
default constructor.
QDataStream & operator<<(QDataStream &out, const KDateTime &dateTime)
This library provides a full-featured HTML parser and widget.
Q_SCRIPTABLE Q_NOREPLY void start()
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
bool operator!=(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
This class implements the basic string we use in the DOM.
QString fromLatin1(const char *str, int size)
DOMStringImpl * implementation() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 03:54:51 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.