KHTML
Go to the documentation of this file.
23 #include "xml/dom_stringimpl.h"
25 #include <wtf/Vector.h>
36 impl =
new DOMStringImpl( str, len );
47 impl =
new DOMStringImpl( str.unicode(), str.length() );
58 impl =
new DOMStringImpl( str );
68 impl =
new DOMStringImpl(str, len);
111 DOMStringImpl *i =
impl->copy();
147 static const QChar nullChar = 0;
149 if(!
impl || i >=
impl->l )
return nullChar;
156 unsigned int l = start;
157 if(!
impl || l >=
impl->l )
return -1;
160 if( *(
impl->s+l) == c )
return l;
168 unsigned int l = start;
169 if (!
impl || l < -impl->l)
return -1;
172 if (*(
impl->s + l) == c)
return l;
204 return impl->split(pos);
210 return impl->lower();
216 return impl->upper();
223 if ( *(
impl->s+
impl->l-1) != QChar(
'%'))
226 _percentage = QString::fromRawData(
impl->s,
impl->l-1).toInt();
233 return impl->unicode();
240 return impl->string();
247 return impl->toInt();
257 return impl->toInt(ok);
267 return impl->toFloat(ok);
304 if ( !bs )
return ( l != 0 );
306 if ( a->toLatin1() != *bs ) {
307 char cc = ( ( *bs >=
'A' ) && ( *bs <=
'Z' ) ) ? ( ( *bs ) +
'a' -
'A' ) : ( *bs );
308 if ( a->toLower().toLatin1() != cc )
return true;
312 return ( *bs !=
'\0' );
323 va_start(args, format);
325 Vector<char, 256> buffer;
329 int result = _vscprintf(format, args);
332 int result = vsnprintf(&ch, 1, format, args);
340 va_start(args, format);
351 unsigned len = result;
352 buffer.grow(len + 1);
355 vsnprintf(buffer.data(), buffer.size(),
format, args);
360 return new DOMStringImpl(buffer.data());
374 if( l != b.length() )
return false;
376 if(!memcmp(a.
unicode(), b.unicode(), l*
sizeof(QChar)))
383 DOMStringImpl* aimpl = a.
impl;
384 if ( !b )
return !aimpl;
388 const QChar *aptr = aimpl->s;
390 unsigned char c = *b++;
391 if ( !c || ( *aptr++ ).unicode() != c )
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 17:52:44 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.