QStringRef Class Reference
#include <qstring.h>
Definition at line 1099 of file qstring.h.
|
| QStringRef () |
|
| QStringRef (const QString *string, int position, int size) |
|
| QStringRef (const QString *string) |
|
| QStringRef (const QStringRef &other) |
|
| ~QStringRef () |
|
const QString * | string () const |
|
int | position () const |
|
int | size () const |
|
int | count () const |
|
int | length () const |
|
QStringRef & | operator= (const QStringRef &other) |
|
int | indexOf (const QString &str, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | indexOf (QChar ch, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | indexOf (QLatin1String str, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | indexOf (const QStringRef &str, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | lastIndexOf (const QString &str, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | lastIndexOf (QChar ch, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | lastIndexOf (QLatin1String str, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | lastIndexOf (const QStringRef &str, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
QBool | contains (const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
QBool | contains (QChar ch, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
QBool | contains (QLatin1String str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
QBool | contains (const QStringRef &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | count (const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | count (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | count (const QStringRef &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | startsWith (const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | startsWith (QLatin1String s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | startsWith (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | startsWith (const QStringRef &c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | endsWith (const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | endsWith (QLatin1String s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | endsWith (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
bool | endsWith (const QStringRef &c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
QStringRef & | operator= (const QString *string) |
|
const QChar * | unicode () const |
|
const QChar * | data () const |
|
const QChar * | constData () const |
|
QByteArray | toAscii () const Q_REQUIRED_RESULT |
|
QByteArray | toLatin1 () const Q_REQUIRED_RESULT |
|
QByteArray | toUtf8 () const Q_REQUIRED_RESULT |
|
QByteArray | toLocal8Bit () const Q_REQUIRED_RESULT |
|
QVector< uint > | toUcs4 () const Q_REQUIRED_RESULT |
|
void | clear () |
|
QString | toString () const |
|
bool | isEmpty () const |
|
bool | isNull () const |
|
QStringRef | appendTo (QString *string) const |
|
const QChar | at (int i) const |
|
int | compare (const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | compare (const QStringRef &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | compare (QLatin1String s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
|
int | localeAwareCompare (const QString &s) const |
|
int | localeAwareCompare (const QStringRef &s) const |
|
Definition at line 1104 of file qstring.h.
1104 :m_string(0), m_position(0), m_size(0){}
Definition at line 1196 of file qstring.h.
1197 :m_string(aString), m_position(aPosition), m_size(aSize){}
Definition at line 1199 of file qstring.h.
1200 :m_string(aString), m_position(0), m_size(aString?aString->size() : 0){}
Definition at line 1107 of file qstring.h.
1108 :m_string(other.m_string), m_position(other.m_position), m_size(other.m_size)
Definition at line 1112 of file qstring.h.
1112 {
return m_string; }
Definition at line 1113 of file qstring.h.
1113 {
return m_position; }
Definition at line 1118 of file qstring.h.
1119 m_string = other.m_string; m_position = other.m_position;
1120 m_size = other.m_size;
return *
this;
Definition at line 1275 of file qstring.h.
1276 {
return QBool(
indexOf(
s, 0, cs) != -1); }
int indexOf(const QString &str, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition at line 1279 of file qstring.h.
1280 {
return QBool(
indexOf(
c, 0, cs) != -1); }
int indexOf(const QString &str, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition at line 1277 of file qstring.h.
1278 {
return QBool(
indexOf(
s, 0, cs) != -1); }
int indexOf(const QString &str, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition at line 1281 of file qstring.h.
1282 {
return QBool(
indexOf(
s, 0, cs) != -1); }
int indexOf(const QString &str, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition at line 1193 of file qstring.h.
1194 { m_string = aString; m_position = 0; m_size = aString?aString->size():0;
return *
this; }
const QChar* unicode |
( |
| ) |
const |
|
inline |
Definition at line 1153 of file qstring.h.
1155 return reinterpret_cast<const QChar *
>(QString::shared_null.data);
1156 return m_string->
unicode() + m_position;
const QChar * unicode() const
Definition at line 1158 of file qstring.h.
const QChar * unicode() const
const QChar* constData |
( |
| ) |
const |
|
inline |
Definition at line 1159 of file qstring.h.
const QChar * unicode() const
Definition at line 1167 of file qstring.h.
1167 { m_string = 0; m_position = m_size = 0; }
Definition at line 1169 of file qstring.h.
1169 {
return m_size == 0; }
Definition at line 1170 of file qstring.h.
1170 {
return m_string == 0 || m_string->
isNull(); }
Definition at line 1174 of file qstring.h.
1175 { Q_ASSERT(uint(i) < uint(
size()));
return m_string->
at(i + m_position); }
const QChar at(int i) const
Definition at line 1249 of file qstring.h.
const QChar * constData() const
const QChar * constData() const
Definition at line 1251 of file qstring.h.
const QChar * constData() const
Definition at line 1253 of file qstring.h.
const QChar * constData() const
Definition at line 1255 of file qstring.h.
const QChar * constData() const
const QChar * constData() const
Definition at line 1257 of file qstring.h.
const QChar * constData() const
Definition at line 1259 of file qstring.h.
1260 {
return QString::compare_helper(s1.
constData(), s1.
length(), s2, cs); }
const QChar * constData() const
Definition at line 1266 of file qstring.h.
const QChar * constData() const
const QChar * constData() const
Definition at line 1268 of file qstring.h.
const QChar * constData() const
Definition at line 1270 of file qstring.h.
const QChar * constData() const
const QChar * constData() const
Definition at line 1272 of file qstring.h.
const QChar * constData() const
The documentation for this class was generated from the following file: