Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 690

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qstring.cpp -->
  <title>QStringRef Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QStringRef</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QStringRef Class</h1>
<!-- $$$QStringRef-brief -->
<p>The <a href="qstringref.html">QStringRef</a> class provides a thin wrapper around <a href="qstring.html">QString</a> substrings. <a href="#details">More...</a></p>
<!-- @@@QStringRef -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QStringRef&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.3</td></tr></table></div><ul>
<li><a href="qstringref-members.html">List of all members, including inherited members</a></li>
<li><a href="qstringref-obsolete.html">Obsolete members</a></li>
</ul>
<p><b>Note:</b> All functions in this class are reentrant.</p>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#const_iterator-typedef">const_iterator</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#const_reverse_iterator-typedef">const_reverse_iterator</a></b></td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#QStringRef">QStringRef</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#QStringRef-1">QStringRef</a></b>(const QString *<i>string</i>, int <i>position</i>, int <i>length</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#QStringRef-2">QStringRef</a></b>(const QString *<i>string</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#QStringRef-3">QStringRef</a></b>(const QStringRef &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#QStringRef-4">QStringRef</a></b>(QStringRef &amp;&amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#dtor.QStringRef">~QStringRef</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#appendTo">appendTo</a></b>(QString *<i>string</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QChar </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#at">at</a></b>(int <i>position</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#begin">begin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#cbegin">cbegin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#cend">cend</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#chop">chop</a></b>(int <i>n</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#clear">clear</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#compare-1">compare</a></b>(const QStringRef &amp;<i>other</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#compare-2">compare</a></b>(QLatin1String <i>other</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#compare-3">compare</a></b>(const QByteArray &amp;<i>other</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#compare-4">compare</a></b>(const QString &amp;<i>other</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#constBegin">constBegin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QChar *</td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#constData">constData</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#constEnd">constEnd</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#contains">contains</a></b>(const QString &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#contains-1">contains</a></b>(QChar <i>ch</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#contains-2">contains</a></b>(QLatin1String <i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#contains-3">contains</a></b>(const QStringRef &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#count">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#count-1">count</a></b>(const QString &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#count-2">count</a></b>(QChar <i>ch</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#count-3">count</a></b>(const QStringRef &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#crbegin">crbegin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#crend">crend</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QChar *</td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#data">data</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#end">end</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#endsWith">endsWith</a></b>(const QString &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#endsWith-1">endsWith</a></b>(QLatin1String <i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#endsWith-2">endsWith</a></b>(QChar <i>ch</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#endsWith-3">endsWith</a></b>(const QStringRef &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#indexOf">indexOf</a></b>(const QString &amp;<i>str</i>, int <i>from</i> = 0, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#indexOf-1">indexOf</a></b>(QChar <i>ch</i>, int <i>from</i> = 0, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#indexOf-2">indexOf</a></b>(QLatin1String <i>str</i>, int <i>from</i> = 0, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#indexOf-3">indexOf</a></b>(const QStringRef &amp;<i>str</i>, int <i>from</i> = 0, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#isEmpty">isEmpty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#isNull">isNull</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#isRightToLeft">isRightToLeft</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#lastIndexOf">lastIndexOf</a></b>(const QString &amp;<i>str</i>, int <i>from</i> = -1, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#lastIndexOf-1">lastIndexOf</a></b>(QChar <i>ch</i>, int <i>from</i> = -1, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#lastIndexOf-2">lastIndexOf</a></b>(QLatin1String <i>str</i>, int <i>from</i> = -1, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#lastIndexOf-3">lastIndexOf</a></b>(const QStringRef &amp;<i>str</i>, int <i>from</i> = -1, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#left">left</a></b>(int <i>n</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#length">length</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#localeAwareCompare-1">localeAwareCompare</a></b>(const QStringRef &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#localeAwareCompare-2">localeAwareCompare</a></b>(const QString &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#mid">mid</a></b>(int <i>position</i>, int <i>n</i> = -1) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#position">position</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#rbegin">rbegin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#rend">rend</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#right">right</a></b>(int <i>n</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#size">size</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;QStringRef&gt; </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#split">split</a></b>(const QString &amp;<i>sep</i>, QString::SplitBehavior <i>behavior</i> = QString::KeepEmptyParts, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;QStringRef&gt; </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#split-1">split</a></b>(QChar <i>sep</i>, QString::SplitBehavior <i>behavior</i> = QString::KeepEmptyParts, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#startsWith">startsWith</a></b>(const QString &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#startsWith-1">startsWith</a></b>(QLatin1String <i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#startsWith-2">startsWith</a></b>(QChar <i>ch</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#startsWith-3">startsWith</a></b>(const QStringRef &amp;<i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QString *</td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#string">string</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toDouble">toDouble</a></b>(bool *<i>ok</i> = Q_NULLPTR) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toFloat">toFloat</a></b>(bool *<i>ok</i> = Q_NULLPTR) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toInt">toInt</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toLatin1">toLatin1</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toLocal8Bit">toLocal8Bit</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> long </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toLong">toLong</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qlonglong </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toLongLong">toLongLong</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> short </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toShort">toShort</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toString">toString</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toUInt">toUInt</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ulong </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toULong">toULong</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qulonglong </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toULongLong">toULongLong</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ushort </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toUShort">toUShort</a></b>(bool *<i>ok</i> = Q_NULLPTR, int <i>base</i> = 10) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;uint&gt; </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toUcs4">toUcs4</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#toUtf8">toUtf8</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#trimmed">trimmed</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#truncate">truncate</a></b>(int <i>position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QChar *</td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#unicode">unicode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-not-eq">operator!=</a></b>(const char *<i>s</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-lt">operator&lt;</a></b>(const char *<i>s</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-lt-eq">operator&lt;=</a></b>(const char *<i>s</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef &amp;</td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-eq">operator=</a></b>(QStringRef &amp;&amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef &amp;</td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-eq-1">operator=</a></b>(const QStringRef &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef &amp;</td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-eq-2">operator=</a></b>(const QString *<i>string</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-eq-eq">operator==</a></b>(const char *<i>s</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-gt">operator&gt;</a></b>(const char *<i>s</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-gt-eq">operator&gt;=</a></b>(const char *<i>s</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QChar </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-5b-5d">operator[]</a></b>(int <i>position</i>) const</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#compare">compare</a></b>(const QStringRef &amp;<i>s1</i>, const QString &amp;<i>s2</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#compare-5">compare</a></b>(const QStringRef &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#compare-6">compare</a></b>(const QStringRef &amp;<i>s1</i>, QLatin1String <i>s2</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#localeAwareCompare">localeAwareCompare</a></b>(const QStringRef &amp;<i>s1</i>, const QString &amp;<i>s2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#localeAwareCompare-3">localeAwareCompare</a></b>(const QStringRef &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
</table></div>
<a name="related-non-members"></a>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-lt-1">operator&lt;</a></b>(const QStringRef &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-lt-eq-1">operator&lt;=</a></b>(const QStringRef &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-eq-eq-1">operator==</a></b>(const QStringRef &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-eq-eq-2">operator==</a></b>(const QString &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-eq-eq-3">operator==</a></b>(QLatin1String <i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-gt-1">operator&gt;</a></b>(const QStringRef &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstringref.html#operator-gt-eq-1">operator&gt;=</a></b>(const QStringRef &amp;<i>s1</i>, const QStringRef &amp;<i>s2</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QStringRef-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qstringref.html">QStringRef</a> class provides a thin wrapper around <a href="qstring.html">QString</a> substrings.</p>
<p><a href="qstringref.html">QStringRef</a> provides a read-only subset of the <a href="qstring.html">QString</a> API.</p>
<p>A string reference explicitly references a portion of a <a href="qstringref.html#string">string</a>() with a given <a href="qstringref.html#size">size</a>(), starting at a specific <a href="qstringref.html#position">position</a>(). Calling <a href="qstringref.html#toString">toString</a>() returns a copy of the data as a real <a href="qstring.html">QString</a> instance.</p>
<p>This class is designed to improve the performance of substring handling when manipulating substrings obtained from existing <a href="qstring.html">QString</a> instances. <a href="qstringref.html">QStringRef</a> avoids the memory allocation and reference counting overhead of a standard <a href="qstring.html">QString</a> by simply referencing a part of the original string. This can prove to be advantageous in low level code, such as that used in a parser, at the expense of potentially more complex code.</p>
<p>For most users, there are no semantic benefits to using <a href="qstringref.html">QStringRef</a> instead of <a href="qstring.html">QString</a> since <a href="qstringref.html">QStringRef</a> requires attention to be paid to memory management issues, potentially making code more complex to write and maintain.</p>
<p><b>Warning:</b> A <a href="qstringref.html">QStringRef</a> is only valid as long as the referenced string exists. If the original string is deleted, the string reference points to an invalid memory location.</p>
<p>We suggest that you only use this class in stable code where profiling has clearly identified that performance improvements can be made by replacing standard string operations with the optimized substring handling provided by this class.</p>
</div>
<p><b>See also </b><a href="implicit-sharing.html#implicitly-shared-classes">Implicitly Shared Classes</a>.</p>
<!-- @@@QStringRef -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$const_iterator -->
<h3 class="fn" id="const_iterator-typedef"><a name="const_iterator-typedef"></a>typedef QStringRef::<span class="name">const_iterator</span></h3>
<p>This typedef provides an STL-style const iterator for <a href="qstringref.html">QStringRef</a>.</p>
<p>This typedef was introduced in  Qt 5.4.</p>
<p><b>See also </b><a href="qstringref.html#const_reverse_iterator-typedef">QStringRef::const_reverse_iterator</a>.</p>
<!-- @@@const_iterator -->
<!-- $$$const_reverse_iterator -->
<h3 class="fn" id="const_reverse_iterator-typedef"><a name="const_reverse_iterator-typedef"></a>typedef QStringRef::<span class="name">const_reverse_iterator</span></h3>
<p>This typedef provides an STL-style const reverse iterator for <a href="qstringref.html">QStringRef</a>.</p>
<p>This typedef was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qstringref.html#const_iterator-typedef">QStringRef::const_iterator</a>.</p>
<!-- @@@const_reverse_iterator -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QStringRef[overload1]$$$QStringRef -->
<h3 class="fn" id="QStringRef"><a name="QStringRef"></a>QStringRef::<span class="name">QStringRef</span>()</h3>
<p>Constructs an empty string reference.</p>
<!-- @@@QStringRef -->
<!-- $$$QStringRef$$$QStringRefconstQString*intint -->
<h3 class="fn" id="QStringRef-1"><a name="QStringRef-1"></a>QStringRef::<span class="name">QStringRef</span>(const <span class="type"><a href="qstring.html">QString</a></span> *<i>string</i>, <span class="type">int</span> <i>position</i>, <span class="type">int</span> <i>length</i>)</h3>
<p>Constructs a string reference to the range of characters in the given <i>string</i> specified by the starting <i>position</i> and <i>length</i> in characters.</p>
<p><b>Warning:</b> This function exists to improve performance as much as possible, and performs no bounds checking. For program correctness, <i>position</i> and <i>length</i> must describe a valid substring of <i>string</i>.</p>
<p>This means that the starting <i>position</i> must be positive or 0 and smaller than <i>string</i>'s length, and <i>length</i> must be positive or 0 but smaller than the string's length minus the starting <i>position</i>; i.e, 0 &lt;= position &lt; string-&gt;<a href="qstringref.html#length">length</a>() and 0 &lt;= length &lt;= string-&gt;<a href="qstringref.html#length">length</a>() - position must both be satisfied.</p>
<!-- @@@QStringRef -->
<!-- $$$QStringRef$$$QStringRefconstQString* -->
<h3 class="fn" id="QStringRef-2"><a name="QStringRef-2"></a>QStringRef::<span class="name">QStringRef</span>(const <span class="type"><a href="qstring.html">QString</a></span> *<i>string</i>)</h3>
<p>Constructs a string reference to the given <i>string</i>.</p>
<!-- @@@QStringRef -->
<!-- $$$QStringRef$$$QStringRefconstQStringRef& -->
<h3 class="fn" id="QStringRef-3"><a name="QStringRef-3"></a>QStringRef::<span class="name">QStringRef</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>other</i>)</h3>
<p>Constructs a copy of the <i>other</i> string reference.</p>
<!-- @@@QStringRef -->
<!-- $$$QStringRef$$$QStringRefQStringRef&& -->
<h3 class="fn" id="QStringRef-4"><a name="QStringRef-4"></a>QStringRef::<span class="name">QStringRef</span>(<span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;&amp;<i>other</i>)</h3>
<p>Move-copy constructor.</p><!-- @@@QStringRef -->
<!-- $$$~QStringRef[overload1]$$$~QStringRef -->
<h3 class="fn" id="dtor.QStringRef"><a name="dtor.QStringRef"></a>QStringRef::<span class="name">~QStringRef</span>()</h3>
<p>Destroys the string reference.</p>
<p>Since this class is only used to refer to string data, and does not take ownership of it, no memory is freed when instances are destroyed.</p>
<!-- @@@~QStringRef -->
<!-- $$$appendTo[overload1]$$$appendToQString* -->
<h3 class="fn" id="appendTo"><a name="appendTo"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> QStringRef::<span class="name">appendTo</span>(<span class="type"><a href="qstring.html">QString</a></span> *<i>string</i>) const</h3>
<p>Appends the string reference to <i>string</i>, and returns a new reference to the combined string data.</p>
<!-- @@@appendTo -->
<!-- $$$at[overload1]$$$atint -->
<h3 class="fn" id="at"><a name="at"></a>const <span class="type"><a href="qchar.html">QChar</a></span> QStringRef::<span class="name">at</span>(<span class="type">int</span> <i>position</i>) const</h3>
<p>Returns the character at the given index <i>position</i> in the string reference.</p>
<p>The <i>position</i> must be a valid index position in the string (i.e&#x2e;, 0 &lt;= <i>position</i> &lt; <a href="qstringref.html#size">size</a>()).</p>
<!-- @@@at -->
<!-- $$$begin[overload1]$$$begin -->
<h3 class="fn" id="begin"><a name="begin"></a><span class="type"><a href="qstringref.html#const_iterator-typedef">const_iterator</a></span> QStringRef::<span class="name">begin</span>() const</h3>
<p>Returns a const <a href="containers.html#stl-style-iterators">STL-style iterator</a> pointing to the first character in the string.</p>
<p>This function was introduced in  Qt 5.4.</p>
<p><b>See also </b><a href="qstringref.html#cbegin">cbegin</a>(), <a href="qstringref.html#constBegin">constBegin</a>(), <a href="qstringref.html#end">end</a>(), <a href="qstringref.html#constEnd">constEnd</a>(), <a href="qstringref.html#rbegin">rbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@begin -->
<!-- $$$cbegin[overload1]$$$cbegin -->
<h3 class="fn" id="cbegin"><a name="cbegin"></a><span class="type"><a href="qstringref.html#const_iterator-typedef">const_iterator</a></span> QStringRef::<span class="name">cbegin</span>() const</h3>
<p>Same as <a href="qstringref.html#begin">begin</a>().</p>
<p>This function was introduced in  Qt 5.4.</p>
<p><b>See also </b><a href="qstringref.html#begin">begin</a>(), <a href="qstringref.html#constBegin">constBegin</a>(), <a href="qstringref.html#cend">cend</a>(), <a href="qstringref.html#constEnd">constEnd</a>(), <a href="qstringref.html#rbegin">rbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@cbegin -->
<!-- $$$cend[overload1]$$$cend -->
<h3 class="fn" id="cend"><a name="cend"></a><span class="type"><a href="qstringref.html#const_iterator-typedef">const_iterator</a></span> QStringRef::<span class="name">cend</span>() const</h3>
<p>Same as <a href="qstringref.html#end">end</a>().</p>
<p>This function was introduced in  Qt 5.4.</p>
<p><b>See also </b><a href="qstringref.html#end">end</a>(), <a href="qstringref.html#constEnd">constEnd</a>(), <a href="qstringref.html#cbegin">cbegin</a>(), <a href="qstringref.html#constBegin">constBegin</a>(), <a href="qstringref.html#rbegin">rbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@cend -->
<!-- $$$chop[overload1]$$$chopint -->
<h3 class="fn" id="chop"><a name="chop"></a><span class="type">void</span> QStringRef::<span class="name">chop</span>(<span class="type">int</span> <i>n</i>)</h3>
<p>Removes <i>n</i> characters from the end of the string.</p>
<p>If <i>n</i> is greater than or equal to <a href="qstringref.html#size">size</a>(), the result is an empty string; if <i>n</i> is negative, it is equivalent to passing zero.</p>
<p>This function was introduced in  Qt 5.8.</p>
<p><b>See also </b><a href="qstring.html#chop">QString::chop</a>() and <a href="qstringref.html#truncate">truncate</a>().</p>
<!-- @@@chop -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><a name="clear"></a><span class="type">void</span> QStringRef::<span class="name">clear</span>()</h3>
<p>Clears the contents of the string reference by making it null and empty.</p>
<p><b>See also </b><a href="qstringref.html#isEmpty">isEmpty</a>() and <a href="qstringref.html#isNull">isNull</a>().</p>
<!-- @@@clear -->
<!-- $$$compare[overload1]$$$compareconstQStringRef&constQString&Qt::CaseSensitivity -->
<h3 class="fn" id="compare"><a name="compare"></a><code>[static] </code><span class="type">int</span> QStringRef::<span class="name">compare</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>s2</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive)</h3>
<p>Compares the string <i>s1</i> with the string <i>s2</i> and returns an integer less than, equal to, or greater than zero if <i>s1</i> is less than, equal to, or greater than <i>s2</i>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, the comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@compare -->
<!-- $$$compare$$$compareconstQStringRef&Qt::CaseSensitivity -->
<h3 class="fn" id="compare-1"><a name="compare-1"></a><span class="type">int</span> QStringRef::<span class="name">compare</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>other</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This is an overloaded function.</p>
<p>Compares this string with the <i>other</i> string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the <i>other</i> string.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, the comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<p>Equivalent to <code>compare(*this, other, cs)</code>.</p>
<p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qstring.html#compare">QString::compare</a>().</p>
<!-- @@@compare -->
<!-- $$$compare$$$compareQLatin1StringQt::CaseSensitivity -->
<h3 class="fn" id="compare-2"><a name="compare-2"></a><span class="type">int</span> QStringRef::<span class="name">compare</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>other</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This is an overloaded function.</p>
<p>Compares this string with the <i>other</i> string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the <i>other</i> string.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, the comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<p>Equivalent to <code>compare(*this, other, cs)</code>.</p>
<p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qstring.html#compare">QString::compare</a>().</p>
<!-- @@@compare -->
<!-- $$$compare$$$compareconstQByteArray&Qt::CaseSensitivity -->
<h3 class="fn" id="compare-3"><a name="compare-3"></a><span class="type">int</span> QStringRef::<span class="name">compare</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>other</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This is an overloaded function.</p>
<p>Compares this string with <i>other</i> and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the <i>other</i> byte array, interpreted as a UTF-8 sequence.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, the comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<p>Equivalent to <code>compare(*this, other, cs)</code>.</p>
<p>This function was introduced in  Qt 5.8.</p>
<p><b>See also </b><a href="qstring.html#compare">QString::compare</a>().</p>
<!-- @@@compare -->
<!-- $$$compare$$$compareconstQString&Qt::CaseSensitivity -->
<h3 class="fn" id="compare-4"><a name="compare-4"></a><span class="type">int</span> QStringRef::<span class="name">compare</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>other</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This is an overloaded function.</p>
<p>Compares this string with the <i>other</i> string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the <i>other</i> string.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, the comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<p>Equivalent to <code>compare(*this, other, cs)</code>.</p>
<p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qstring.html#compare">QString::compare</a>().</p>
<!-- @@@compare -->
<!-- $$$compare$$$compareconstQStringRef&constQStringRef&Qt::CaseSensitivity -->
<h3 class="fn" id="compare-5"><a name="compare-5"></a><code>[static] </code><span class="type">int</span> QStringRef::<span class="name">compare</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive)</h3>
<p>This is an overloaded function.</p>
<p>Compares the string <i>s1</i> with the string <i>s2</i> and returns an integer less than, equal to, or greater than zero if <i>s1</i> is less than, equal to, or greater than <i>s2</i>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, the comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@compare -->
<!-- $$$compare$$$compareconstQStringRef&QLatin1StringQt::CaseSensitivity -->
<h3 class="fn" id="compare-6"><a name="compare-6"></a><code>[static] </code><span class="type">int</span> QStringRef::<span class="name">compare</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>s2</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive)</h3>
<p>This is an overloaded function.</p>
<p>Compares the string <i>s1</i> with the string <i>s2</i> and returns an integer less than, equal to, or greater than zero if <i>s1</i> is less than, equal to, or greater than <i>s2</i>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, the comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@compare -->
<!-- $$$constBegin[overload1]$$$constBegin -->
<h3 class="fn" id="constBegin"><a name="constBegin"></a><span class="type"><a href="qstringref.html#const_iterator-typedef">const_iterator</a></span> QStringRef::<span class="name">constBegin</span>() const</h3>
<p>Same as <a href="qstringref.html#begin">begin</a>().</p>
<p>This function was introduced in  Qt 5.9.</p>
<p><b>See also </b><a href="qstringref.html#begin">begin</a>(), <a href="qstringref.html#cend">cend</a>(), <a href="qstringref.html#constEnd">constEnd</a>(), <a href="qstringref.html#rbegin">rbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@constBegin -->
<!-- $$$constData[overload1]$$$constData -->
<h3 class="fn" id="constData"><a name="constData"></a>const <span class="type"><a href="qchar.html">QChar</a></span> *QStringRef::<span class="name">constData</span>() const</h3>
<p>Same as <a href="qstringref.html#unicode">unicode</a>().</p>
<!-- @@@constData -->
<!-- $$$constEnd[overload1]$$$constEnd -->
<h3 class="fn" id="constEnd"><a name="constEnd"></a><span class="type"><a href="qstringref.html#const_iterator-typedef">const_iterator</a></span> QStringRef::<span class="name">constEnd</span>() const</h3>
<p>Same as <a href="qstringref.html#end">end</a>().</p>
<p>This function was introduced in  Qt 5.9.</p>
<p><b>See also </b><a href="qstringref.html#end">end</a>(), <a href="qstringref.html#cend">cend</a>(), <a href="qstringref.html#cbegin">cbegin</a>(), <a href="qstringref.html#constBegin">constBegin</a>(), <a href="qstringref.html#rbegin">rbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@constEnd -->
<!-- $$$contains[overload1]$$$containsconstQString&Qt::CaseSensitivity -->
<h3 class="fn" id="contains"><a name="contains"></a><span class="type">bool</span> QStringRef::<span class="name">contains</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Returns <code>true</code> if this string reference contains an occurrence of the string <i>str</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstringref.html#indexOf">indexOf</a>() and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsQCharQt::CaseSensitivity -->
<h3 class="fn" id="contains-1"><a name="contains-1"></a><span class="type">bool</span> QStringRef::<span class="name">contains</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#contains">contains</a>().</p>
<p>Returns <code>true</code> if this string contains an occurrence of the character <i>ch</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsQLatin1StringQt::CaseSensitivity -->
<h3 class="fn" id="contains-2"><a name="contains-2"></a><span class="type">bool</span> QStringRef::<span class="name">contains</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#contains">contains</a>().</p>
<p>Returns <code>true</code> if this string reference contains an occurrence of the string <i>str</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstringref.html#indexOf">indexOf</a>() and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsconstQStringRef&Qt::CaseSensitivity -->
<h3 class="fn" id="contains-3"><a name="contains-3"></a><span class="type">bool</span> QStringRef::<span class="name">contains</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#contains">contains</a>().</p>
<p>Returns <code>true</code> if this string reference contains an occurrence of the string reference <i>str</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstringref.html#indexOf">indexOf</a>() and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@contains -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn" id="count"><a name="count"></a><span class="type">int</span> QStringRef::<span class="name">count</span>() const</h3>
<p>Returns the number of characters referred to by the string reference. Equivalent to <a href="qstringref.html#size">size</a>() and <a href="qstringref.html#length">length</a>().</p>
<p><b>See also </b><a href="qstringref.html#position">position</a>() and <a href="qstringref.html#string">string</a>().</p>
<!-- @@@count -->
<!-- $$$count$$$countconstQString&Qt::CaseSensitivity -->
<h3 class="fn" id="count-1"><a name="count-1"></a><span class="type">int</span> QStringRef::<span class="name">count</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Returns the number of (potentially overlapping) occurrences of the string <i>str</i> in this string reference.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#count-2">QString::count</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#indexOf">indexOf</a>().</p>
<!-- @@@count -->
<!-- $$$count$$$countQCharQt::CaseSensitivity -->
<h3 class="fn" id="count-2"><a name="count-2"></a><span class="type">int</span> QStringRef::<span class="name">count</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#count">count</a>().</p>
<p>Returns the number of occurrences of the character <i>ch</i> in the string reference.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#count-2">QString::count</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#indexOf">indexOf</a>().</p>
<!-- @@@count -->
<!-- $$$count$$$countconstQStringRef&Qt::CaseSensitivity -->
<h3 class="fn" id="count-3"><a name="count-3"></a><span class="type">int</span> QStringRef::<span class="name">count</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#count">count</a>().</p>
<p>Returns the number of (potentially overlapping) occurrences of the string reference <i>str</i> in this string reference.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#count-2">QString::count</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#indexOf">indexOf</a>().</p>
<!-- @@@count -->
<!-- $$$crbegin[overload1]$$$crbegin -->
<h3 class="fn" id="crbegin"><a name="crbegin"></a><span class="type"><a href="qstringref.html#const_reverse_iterator-typedef">const_reverse_iterator</a></span> QStringRef::<span class="name">crbegin</span>() const</h3>
<p>Same as <a href="qstringref.html#rbegin">rbegin</a>().</p>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qstringref.html#begin">begin</a>(), <a href="qstringref.html#rbegin">rbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@crbegin -->
<!-- $$$crend[overload1]$$$crend -->
<h3 class="fn" id="crend"><a name="crend"></a><span class="type"><a href="qstringref.html#const_reverse_iterator-typedef">const_reverse_iterator</a></span> QStringRef::<span class="name">crend</span>() const</h3>
<p>Same as <a href="qstringref.html#rend">rend</a>().</p>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qstringref.html#end">end</a>(), <a href="qstringref.html#rend">rend</a>(), and <a href="qstringref.html#rbegin">rbegin</a>().</p>
<!-- @@@crend -->
<!-- $$$data[overload1]$$$data -->
<h3 class="fn" id="data"><a name="data"></a>const <span class="type"><a href="qchar.html">QChar</a></span> *QStringRef::<span class="name">data</span>() const</h3>
<p>Same as <a href="qstringref.html#unicode">unicode</a>().</p>
<!-- @@@data -->
<!-- $$$end[overload1]$$$end -->
<h3 class="fn" id="end"><a name="end"></a><span class="type"><a href="qstringref.html#const_iterator-typedef">const_iterator</a></span> QStringRef::<span class="name">end</span>() const</h3>
<p>Returns a const <a href="containers.html#stl-style-iterators">STL-style iterator</a> pointing to the imaginary character after the last character in the list.</p>
<p>This function was introduced in  Qt 5.4.</p>
<p><b>See also </b><a href="qstringref.html#cbegin">cbegin</a>(), <a href="qstringref.html#constBegin">constBegin</a>(), end(), <a href="qstringref.html#constEnd">constEnd</a>(), <a href="qstringref.html#rbegin">rbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@end -->
<!-- $$$endsWith[overload1]$$$endsWithconstQString&Qt::CaseSensitivity -->
<h3 class="fn" id="endsWith"><a name="endsWith"></a><span class="type">bool</span> QStringRef::<span class="name">endsWith</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Returns <code>true</code> if the string reference ends with <i>str</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#endsWith">QString::endsWith</a>() and <a href="qstringref.html#startsWith">startsWith</a>().</p>
<!-- @@@endsWith -->
<!-- $$$endsWith$$$endsWithQLatin1StringQt::CaseSensitivity -->
<h3 class="fn" id="endsWith-1"><a name="endsWith-1"></a><span class="type">bool</span> QStringRef::<span class="name">endsWith</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#endsWith">endsWith</a>().</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#endsWith">QString::endsWith</a>() and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@endsWith -->
<!-- $$$endsWith$$$endsWithQCharQt::CaseSensitivity -->
<h3 class="fn" id="endsWith-2"><a name="endsWith-2"></a><span class="type">bool</span> QStringRef::<span class="name">endsWith</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#endsWith">endsWith</a>().</p>
<p>Returns <code>true</code> if the string reference ends with <i>ch</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#endsWith">QString::endsWith</a>() and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@endsWith -->
<!-- $$$endsWith$$$endsWithconstQStringRef&Qt::CaseSensitivity -->
<h3 class="fn" id="endsWith-3"><a name="endsWith-3"></a><span class="type">bool</span> QStringRef::<span class="name">endsWith</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#endsWith">endsWith</a>().</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#endsWith">QString::endsWith</a>() and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@endsWith -->
<!-- $$$indexOf[overload1]$$$indexOfconstQString&intQt::CaseSensitivity -->
<h3 class="fn" id="indexOf"><a name="indexOf"></a><span class="type">int</span> QStringRef::<span class="name">indexOf</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type">int</span> <i>from</i> = 0, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Returns the index position of the first occurrence of the string <i>str</i> in this string reference, searching forward from index position <i>from</i>. Returns -1 if <i>str</i> is not found.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>If <i>from</i> is -1, the search starts at the last character; if it is -2, at the next to last character and so on.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#indexOf">QString::indexOf</a>(), <a href="qstringref.html#lastIndexOf">lastIndexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@indexOf -->
<!-- $$$indexOf$$$indexOfQCharintQt::CaseSensitivity -->
<h3 class="fn" id="indexOf-1"><a name="indexOf-1"></a><span class="type">int</span> QStringRef::<span class="name">indexOf</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>, <span class="type">int</span> <i>from</i> = 0, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#indexOf">indexOf</a>().</p>
<p>Returns the index position of the first occurrence of the character <i>ch</i> in the string reference, searching forward from index position <i>from</i>. Returns -1 if <i>ch</i> could not be found.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#indexOf">QString::indexOf</a>(), <a href="qstringref.html#lastIndexOf">lastIndexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@indexOf -->
<!-- $$$indexOf$$$indexOfQLatin1StringintQt::CaseSensitivity -->
<h3 class="fn" id="indexOf-2"><a name="indexOf-2"></a><span class="type">int</span> QStringRef::<span class="name">indexOf</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>str</i>, <span class="type">int</span> <i>from</i> = 0, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Returns the index position of the first occurrence of the string <i>str</i> in this string reference, searching forward from index position <i>from</i>. Returns -1 if <i>str</i> is not found.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>If <i>from</i> is -1, the search starts at the last character; if it is -2, at the next to last character and so on.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#indexOf">QString::indexOf</a>(), <a href="qstringref.html#lastIndexOf">lastIndexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@indexOf -->
<!-- $$$indexOf$$$indexOfconstQStringRef&intQt::CaseSensitivity -->
<h3 class="fn" id="indexOf-3"><a name="indexOf-3"></a><span class="type">int</span> QStringRef::<span class="name">indexOf</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>str</i>, <span class="type">int</span> <i>from</i> = 0, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#indexOf">indexOf</a>().</p>
<p>Returns the index position of the first occurrence of the string reference <i>str</i> in this string reference, searching forward from index position <i>from</i>. Returns -1 if <i>str</i> is not found.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#indexOf">QString::indexOf</a>(), <a href="qstringref.html#lastIndexOf">lastIndexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@indexOf -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn" id="isEmpty"><a name="isEmpty"></a><span class="type">bool</span> QStringRef::<span class="name">isEmpty</span>() const</h3>
<p>Returns <code>true</code> if the string reference has no characters; otherwise returns <code>false</code>.</p>
<p>A string reference is empty if its size is zero.</p>
<p><b>See also </b><a href="qstringref.html#size">size</a>().</p>
<!-- @@@isEmpty -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn" id="isNull"><a name="isNull"></a><span class="type">bool</span> QStringRef::<span class="name">isNull</span>() const</h3>
<p>Returns <code>true</code> if <a href="qstringref.html#string">string</a>() returns a null pointer or a pointer to a null string; otherwise returns <code>true</code>.</p>
<p><b>See also </b><a href="qstringref.html#size">size</a>().</p>
<!-- @@@isNull -->
<!-- $$$isRightToLeft[overload1]$$$isRightToLeft -->
<h3 class="fn" id="isRightToLeft"><a name="isRightToLeft"></a><span class="type">bool</span> QStringRef::<span class="name">isRightToLeft</span>() const</h3>
<p>Returns <code>true</code> if the string is read right to left.</p>
<p>This function was introduced in  Qt 5.9.</p>
<p><b>See also </b><a href="qstring.html#isRightToLeft">QString::isRightToLeft</a>().</p>
<!-- @@@isRightToLeft -->
<!-- $$$lastIndexOf[overload1]$$$lastIndexOfconstQString&intQt::CaseSensitivity -->
<h3 class="fn" id="lastIndexOf"><a name="lastIndexOf"></a><span class="type">int</span> QStringRef::<span class="name">lastIndexOf</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type">int</span> <i>from</i> = -1, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Returns the index position of the last occurrence of the string <i>str</i> in this string reference, searching backward from index position <i>from</i>. If <i>from</i> is -1 (default), the search starts at the last character; if <i>from</i> is -2, at the next to last character and so on. Returns -1 if <i>str</i> is not found.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#lastIndexOf">QString::lastIndexOf</a>(), <a href="qstringref.html#indexOf">indexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@lastIndexOf -->
<!-- $$$lastIndexOf$$$lastIndexOfQCharintQt::CaseSensitivity -->
<h3 class="fn" id="lastIndexOf-1"><a name="lastIndexOf-1"></a><span class="type">int</span> QStringRef::<span class="name">lastIndexOf</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>, <span class="type">int</span> <i>from</i> = -1, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#lastIndexOf">lastIndexOf</a>().</p>
<p>Returns the index position of the last occurrence of the character <i>ch</i>, searching backward from position <i>from</i>.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#lastIndexOf">QString::lastIndexOf</a>(), <a href="qstringref.html#indexOf">indexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@lastIndexOf -->
<!-- $$$lastIndexOf$$$lastIndexOfQLatin1StringintQt::CaseSensitivity -->
<h3 class="fn" id="lastIndexOf-2"><a name="lastIndexOf-2"></a><span class="type">int</span> QStringRef::<span class="name">lastIndexOf</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>str</i>, <span class="type">int</span> <i>from</i> = -1, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#lastIndexOf">lastIndexOf</a>().</p>
<p>Returns the index position of the last occurrence of the string <i>str</i> in this string reference, searching backward from index position <i>from</i>. If <i>from</i> is -1 (default), the search starts at the last character; if <i>from</i> is -2, at the next to last character and so on. Returns -1 if <i>str</i> is not found.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#lastIndexOf">QString::lastIndexOf</a>(), <a href="qstringref.html#indexOf">indexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@lastIndexOf -->
<!-- $$$lastIndexOf$$$lastIndexOfconstQStringRef&intQt::CaseSensitivity -->
<h3 class="fn" id="lastIndexOf-3"><a name="lastIndexOf-3"></a><span class="type">int</span> QStringRef::<span class="name">lastIndexOf</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>str</i>, <span class="type">int</span> <i>from</i> = -1, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#lastIndexOf">lastIndexOf</a>().</p>
<p>Returns the index position of the last occurrence of the string reference <i>str</i> in this string reference, searching backward from index position <i>from</i>. If <i>from</i> is -1 (default), the search starts at the last character; if <i>from</i> is -2, at the next to last character and so on. Returns -1 if <i>str</i> is not found.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#lastIndexOf">QString::lastIndexOf</a>(), <a href="qstringref.html#indexOf">indexOf</a>(), <a href="qstringref.html#contains">contains</a>(), and <a href="qstringref.html#count">count</a>().</p>
<!-- @@@lastIndexOf -->
<!-- $$$left[overload1]$$$leftint -->
<h3 class="fn" id="left"><a name="left"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> QStringRef::<span class="name">left</span>(<span class="type">int</span> <i>n</i>) const</h3>
<p>Returns a substring reference to the <i>n</i> leftmost characters of the string.</p>
<p>If <i>n</i> is greater than or equal to <a href="qstringref.html#size">size</a>(), or less than zero, a reference to the entire string is returned.</p>
<p>This function was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qstringref.html#right">right</a>(), <a href="qstringref.html#mid">mid</a>(), and <a href="qstringref.html#startsWith">startsWith</a>().</p>
<!-- @@@left -->
<!-- $$$length[overload1]$$$length -->
<h3 class="fn" id="length"><a name="length"></a><span class="type">int</span> QStringRef::<span class="name">length</span>() const</h3>
<p>Returns the number of characters referred to by the string reference. Equivalent to <a href="qstringref.html#size">size</a>() and <a href="qstringref.html#count">count</a>().</p>
<p><b>See also </b><a href="qstringref.html#position">position</a>() and <a href="qstringref.html#string">string</a>().</p>
<!-- @@@length -->
<!-- $$$localeAwareCompare[overload1]$$$localeAwareCompareconstQStringRef&constQString& -->
<h3 class="fn" id="localeAwareCompare"><a name="localeAwareCompare"></a><code>[static] </code><span class="type">int</span> QStringRef::<span class="name">localeAwareCompare</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>s2</i>)</h3>
<p>Compares <i>s1</i> with <i>s2</i> and returns an integer less than, equal to, or greater than zero if <i>s1</i> is less than, equal to, or greater than <i>s2</i>.</p>
<p>The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.</p>
<p>On macOS and iOS, this function compares according the &quot;Order for sorted lists&quot; setting in the International prefereces panel.</p>
<p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qstringref.html#compare">compare</a>() and <a href="qlocale.html">QLocale</a>.</p>
<!-- @@@localeAwareCompare -->
<!-- $$$localeAwareCompare$$$localeAwareCompareconstQStringRef& -->
<h3 class="fn" id="localeAwareCompare-1"><a name="localeAwareCompare-1"></a><span class="type">int</span> QStringRef::<span class="name">localeAwareCompare</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>other</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Compares this string with the <i>other</i> string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the <i>other</i> string.</p>
<p>The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@localeAwareCompare -->
<!-- $$$localeAwareCompare$$$localeAwareCompareconstQString& -->
<h3 class="fn" id="localeAwareCompare-2"><a name="localeAwareCompare-2"></a><span class="type">int</span> QStringRef::<span class="name">localeAwareCompare</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>other</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Compares this string with the <i>other</i> string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the <i>other</i> string.</p>
<p>The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@localeAwareCompare -->
<!-- $$$localeAwareCompare$$$localeAwareCompareconstQStringRef&constQStringRef& -->
<h3 class="fn" id="localeAwareCompare-3"><a name="localeAwareCompare-3"></a><code>[static] </code><span class="type">int</span> QStringRef::<span class="name">localeAwareCompare</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>This is an overloaded function.</p>
<p>Compares <i>s1</i> with <i>s2</i> and returns an integer less than, equal to, or greater than zero if <i>s1</i> is less than, equal to, or greater than <i>s2</i>.</p>
<p>The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@localeAwareCompare -->
<!-- $$$mid[overload1]$$$midintint -->
<h3 class="fn" id="mid"><a name="mid"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> QStringRef::<span class="name">mid</span>(<span class="type">int</span> <i>position</i>, <span class="type">int</span> <i>n</i> = -1) const</h3>
<p>Returns a substring reference to <i>n</i> characters of this string, starting at the specified <i>position</i>.</p>
<p>If the <i>position</i> exceeds the length of the string, a null reference is returned.</p>
<p>If there are less than <i>n</i> characters available in the string, starting at the given <i>position</i>, or if <i>n</i> is -1 (default), the function returns all characters from the specified <i>position</i> onwards.</p>
<p>This function was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qstringref.html#left">left</a>() and <a href="qstringref.html#right">right</a>().</p>
<!-- @@@mid -->
<!-- $$$position[overload1]$$$position -->
<h3 class="fn" id="position"><a name="position"></a><span class="type">int</span> QStringRef::<span class="name">position</span>() const</h3>
<p>Returns the starting position in the referenced string that is referred to by the string reference.</p>
<p><b>See also </b><a href="qstringref.html#size">size</a>() and <a href="qstringref.html#string">string</a>().</p>
<!-- @@@position -->
<!-- $$$rbegin[overload1]$$$rbegin -->
<h3 class="fn" id="rbegin"><a name="rbegin"></a><span class="type"><a href="qstringref.html#const_reverse_iterator-typedef">const_reverse_iterator</a></span> QStringRef::<span class="name">rbegin</span>() const</h3>
<p>Returns a const <a href="containers.html#stl-style-iterators">STL-style</a> reverse iterator pointing to the first character in the string, in reverse order.</p>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qstringref.html#begin">begin</a>(), <a href="qstringref.html#crbegin">crbegin</a>(), and <a href="qstringref.html#rend">rend</a>().</p>
<!-- @@@rbegin -->
<!-- $$$rend[overload1]$$$rend -->
<h3 class="fn" id="rend"><a name="rend"></a><span class="type"><a href="qstringref.html#const_reverse_iterator-typedef">const_reverse_iterator</a></span> QStringRef::<span class="name">rend</span>() const</h3>
<p>Returns a <a href="containers.html#stl-style-iterators">STL-style</a> reverse iterator pointing to one past the last character in the string, in reverse order.</p>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qstringref.html#end">end</a>(), <a href="qstringref.html#crend">crend</a>(), and <a href="qstringref.html#rbegin">rbegin</a>().</p>
<!-- @@@rend -->
<!-- $$$right[overload1]$$$rightint -->
<h3 class="fn" id="right"><a name="right"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> QStringRef::<span class="name">right</span>(<span class="type">int</span> <i>n</i>) const</h3>
<p>Returns a substring reference to the <i>n</i> rightmost characters of the string.</p>
<p>If <i>n</i> is greater than or equal to <a href="qstringref.html#size">size</a>(), or less than zero, a reference to the entire string is returned.</p>
<p>This function was introduced in  Qt 5.2.</p>
<p><b>See also </b><a href="qstringref.html#left">left</a>(), <a href="qstringref.html#mid">mid</a>(), and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@right -->
<!-- $$$size[overload1]$$$size -->
<h3 class="fn" id="size"><a name="size"></a><span class="type">int</span> QStringRef::<span class="name">size</span>() const</h3>
<p>Returns the number of characters referred to by the string reference. Equivalent to <a href="qstringref.html#length">length</a>() and <a href="qstringref.html#count">count</a>().</p>
<p><b>See also </b><a href="qstringref.html#position">position</a>() and <a href="qstringref.html#string">string</a>().</p>
<!-- @@@size -->
<!-- $$$split[overload1]$$$splitconstQString&QString::SplitBehaviorQt::CaseSensitivity -->
<h3 class="fn" id="split"><a name="split"></a><span class="type"><a href="qvector.html">QVector</a></span>&lt;<span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span>&gt; QStringRef::<span class="name">split</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>sep</i>, <span class="type"><a href="qstring.html#SplitBehavior-enum">QString::SplitBehavior</a></span> <i>behavior</i> = QString::KeepEmptyParts, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Splits the string into substrings references wherever <i>sep</i> occurs, and returns the list of those strings.</p>
<p>See <a href="qstring.html#split">QString::split</a>() for how <i>sep</i>, <i>behavior</i> and <i>cs</i> interact to form the result.</p>
<p><b>Note: </b>All references are valid as long this string is alive. Destroying this string will cause all references be dangling pointers.</p><p>This function was introduced in  Qt 5.4.</p>
<!-- @@@split -->
<!-- $$$split$$$splitQCharQString::SplitBehaviorQt::CaseSensitivity -->
<h3 class="fn" id="split-1"><a name="split-1"></a><span class="type"><a href="qvector.html">QVector</a></span>&lt;<span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span>&gt; QStringRef::<span class="name">split</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>sep</i>, <span class="type"><a href="qstring.html#SplitBehavior-enum">QString::SplitBehavior</a></span> <i>behavior</i> = QString::KeepEmptyParts, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This is an overloaded function.</p>
<p>This function was introduced in  Qt 5.4.</p>
<!-- @@@split -->
<!-- $$$startsWith[overload1]$$$startsWithconstQString&Qt::CaseSensitivity -->
<h3 class="fn" id="startsWith"><a name="startsWith"></a><span class="type">bool</span> QStringRef::<span class="name">startsWith</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>Returns <code>true</code> if the string reference starts with <i>str</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#startsWith">QString::startsWith</a>() and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@startsWith -->
<!-- $$$startsWith$$$startsWithQLatin1StringQt::CaseSensitivity -->
<h3 class="fn" id="startsWith-1"><a name="startsWith-1"></a><span class="type">bool</span> QStringRef::<span class="name">startsWith</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#startsWith">startsWith</a>().</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#startsWith">QString::startsWith</a>() and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@startsWith -->
<!-- $$$startsWith$$$startsWithQCharQt::CaseSensitivity -->
<h3 class="fn" id="startsWith-2"><a name="startsWith-2"></a><span class="type">bool</span> QStringRef::<span class="name">startsWith</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#startsWith">startsWith</a>().</p>
<p>Returns <code>true</code> if the string reference starts with <i>ch</i>; otherwise returns <code>false</code>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (default), the search is case sensitive; otherwise the search is case insensitive.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#startsWith">QString::startsWith</a>() and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@startsWith -->
<!-- $$$startsWith$$$startsWithconstQStringRef&Qt::CaseSensitivity -->
<h3 class="fn" id="startsWith-3"><a name="startsWith-3"></a><span class="type">bool</span> QStringRef::<span class="name">startsWith</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>str</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3>
<p>This function overloads <a href="qstringref.html#startsWith">startsWith</a>().</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstring.html#startsWith">QString::startsWith</a>() and <a href="qstringref.html#endsWith">endsWith</a>().</p>
<!-- @@@startsWith -->
<!-- $$$string[overload1]$$$string -->
<h3 class="fn" id="string"><a name="string"></a>const <span class="type"><a href="qstring.html">QString</a></span> *QStringRef::<span class="name">string</span>() const</h3>
<p>Returns a pointer to the string referred to by the string reference, or 0 if it does not reference a string.</p>
<p><b>See also </b><a href="qstringref.html#unicode">unicode</a>().</p>
<!-- @@@string -->
<!-- $$$toDouble[overload1]$$$toDoublebool* -->
<h3 class="fn" id="toDouble"><a name="toDouble"></a><span class="type">double</span> QStringRef::<span class="name">toDouble</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR) const</h3>
<p>Returns the string converted to a <code>double</code> value.</p>
<p>Returns 0.0 if the conversion fails.</p>
<p>If a conversion error occurs, <code>*</code><i>ok</i> is set to <code>false</code>; otherwise <code>*</code><i>ok</i> is set to <code>true</code>.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toDouble">QLocale::toDouble</a>()</p>
<p>For historic reasons, this function does not handle thousands group separators. If you need to convert such numbers, use <a href="qlocale.html#toDouble">QLocale::toDouble</a>().</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toDouble">QString::toDouble</a>().</p>
<!-- @@@toDouble -->
<!-- $$$toFloat[overload1]$$$toFloatbool* -->
<h3 class="fn" id="toFloat"><a name="toFloat"></a><span class="type">float</span> QStringRef::<span class="name">toFloat</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR) const</h3>
<p>Returns the string converted to a <code>float</code> value.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>. Returns 0.0 if the conversion fails.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toFloat">QLocale::toFloat</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toFloat">QString::toFloat</a>().</p>
<!-- @@@toFloat -->
<!-- $$$toInt[overload1]$$$toIntbool*int -->
<h3 class="fn" id="toInt"><a name="toInt"></a><span class="type">int</span> QStringRef::<span class="name">toInt</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to an <code>int</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toInt">QLocale::toInt</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toInt">QString::toInt</a>().</p>
<!-- @@@toInt -->
<!-- $$$toLatin1[overload1]$$$toLatin1 -->
<h3 class="fn" id="toLatin1"><a name="toLatin1"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QStringRef::<span class="name">toLatin1</span>() const</h3>
<p>Returns a Latin-1 representation of the string as a <a href="qbytearray.html">QByteArray</a>.</p>
<p>The returned byte array is undefined if the string contains non-Latin1 characters. Those characters may be suppressed or replaced with a question mark.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstringref.html#toUtf8">toUtf8</a>(), <a href="qstringref.html#toLocal8Bit">toLocal8Bit</a>(), and <a href="qtextcodec.html">QTextCodec</a>.</p>
<!-- @@@toLatin1 -->
<!-- $$$toLocal8Bit[overload1]$$$toLocal8Bit -->
<h3 class="fn" id="toLocal8Bit"><a name="toLocal8Bit"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QStringRef::<span class="name">toLocal8Bit</span>() const</h3>
<p>Returns the local 8-bit representation of the string as a <a href="qbytearray.html">QByteArray</a>. The returned byte array is undefined if the string contains characters not supported by the local 8-bit encoding.</p>
<p><a href="qtextcodec.html#codecForLocale">QTextCodec::codecForLocale</a>() is used to perform the conversion from Unicode. If the locale encoding could not be determined, this function does the same as <a href="qstringref.html#toLatin1">toLatin1</a>().</p>
<p>If this string contains any characters that cannot be encoded in the locale, the returned byte array is undefined. Those characters may be suppressed or replaced by another.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstringref.html#toLatin1">toLatin1</a>(), <a href="qstringref.html#toUtf8">toUtf8</a>(), and <a href="qtextcodec.html">QTextCodec</a>.</p>
<!-- @@@toLocal8Bit -->
<!-- $$$toLong[overload1]$$$toLongbool*int -->
<h3 class="fn" id="toLong"><a name="toLong"></a><span class="type">long</span> QStringRef::<span class="name">toLong</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to a <code>long</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use QLocale::toLong()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toLong">QString::toLong</a>().</p>
<!-- @@@toLong -->
<!-- $$$toLongLong[overload1]$$$toLongLongbool*int -->
<h3 class="fn" id="toLongLong"><a name="toLongLong"></a><span class="type"><a href="qtglobal.html#qlonglong-typedef">qlonglong</a></span> QStringRef::<span class="name">toLongLong</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to a <code>long long</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toLongLong">QLocale::toLongLong</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toLongLong">QString::toLongLong</a>().</p>
<!-- @@@toLongLong -->
<!-- $$$toShort[overload1]$$$toShortbool*int -->
<h3 class="fn" id="toShort"><a name="toShort"></a><span class="type">short</span> QStringRef::<span class="name">toShort</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to a <code>short</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toShort">QLocale::toShort</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toShort">QString::toShort</a>().</p>
<!-- @@@toShort -->
<!-- $$$toString[overload1]$$$toString -->
<h3 class="fn" id="toString"><a name="toString"></a><span class="type"><a href="qstring.html">QString</a></span> QStringRef::<span class="name">toString</span>() const</h3>
<p>Returns a copy of the string reference as a <a href="qstring.html">QString</a> object.</p>
<p>If the string reference is not a complete reference of the string (meaning that <a href="qstringref.html#position">position</a>() is 0 and <a href="qstringref.html#size">size</a>() equals <a href="qstringref.html#string">string</a>()-&gt;<a href="qstringref.html#size">size</a>()), this function will allocate a new string to return.</p>
<p><b>See also </b><a href="qstringref.html#string">string</a>().</p>
<!-- @@@toString -->
<!-- $$$toUInt[overload1]$$$toUIntbool*int -->
<h3 class="fn" id="toUInt"><a name="toUInt"></a><span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> QStringRef::<span class="name">toUInt</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to an <code>unsigned int</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toUInt">QLocale::toUInt</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toUInt">QString::toUInt</a>().</p>
<!-- @@@toUInt -->
<!-- $$$toULong[overload1]$$$toULongbool*int -->
<h3 class="fn" id="toULong"><a name="toULong"></a><span class="type"><a href="qtglobal.html#ulong-typedef">ulong</a></span> QStringRef::<span class="name">toULong</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to an <code>unsigned long</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toULongLong">QLocale::toULongLong</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toULong">QString::toULong</a>().</p>
<!-- @@@toULong -->
<!-- $$$toULongLong[overload1]$$$toULongLongbool*int -->
<h3 class="fn" id="toULongLong"><a name="toULongLong"></a><span class="type"><a href="qtglobal.html#qulonglong-typedef">qulonglong</a></span> QStringRef::<span class="name">toULongLong</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to an <code>unsigned long long</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toULongLong">QLocale::toULongLong</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toULongLong">QString::toULongLong</a>().</p>
<!-- @@@toULongLong -->
<!-- $$$toUShort[overload1]$$$toUShortbool*int -->
<h3 class="fn" id="toUShort"><a name="toUShort"></a><span class="type"><a href="qtglobal.html#ushort-typedef">ushort</a></span> QStringRef::<span class="name">toUShort</span>(<span class="type">bool</span> *<i>ok</i> = Q_NULLPTR, <span class="type">int</span> <i>base</i> = 10) const</h3>
<p>Returns the string converted to an <code>unsigned short</code> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0. Returns 0 if the conversion fails.</p>
<p>If a conversion error occurs, *<i>ok</i> is set to <code>false</code>; otherwise *<i>ok</i> is set to <code>true</code>.</p>
<p>If <i>base</i> is 0, the C language convention is used: If the string begins with &quot;0x&quot;, base 16 is used; if the string begins with &quot;0&quot;, base 8 is used; otherwise, base 10 is used.</p>
<p>The string conversion will always happen in the 'C' locale. For locale dependent conversion use <a href="qlocale.html#toUShort">QLocale::toUShort</a>()</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#toUShort">QString::toUShort</a>().</p>
<!-- @@@toUShort -->
<!-- $$$toUcs4[overload1]$$$toUcs4 -->
<h3 class="fn" id="toUcs4"><a name="toUcs4"></a><span class="type"><a href="qvector.html">QVector</a></span>&lt;<span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span>&gt; QStringRef::<span class="name">toUcs4</span>() const</h3>
<p>Returns a UCS-4/UTF-32 representation of the string as a <a href="qvector.html">QVector</a>&lt;uint&gt;.</p>
<p>UCS-4 is a Unicode codec and therefore it is lossless. All characters from this string will be encoded in UCS-4. Any invalid sequence of code units in this string is replaced by the Unicode's replacement character (<a href="qchar.html#SpecialCharacter-enum">QChar::ReplacementCharacter</a>, which corresponds to <code>U+FFFD</code>).</p>
<p>The returned vector is not NUL terminated.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstringref.html#toUtf8">toUtf8</a>(), <a href="qstringref.html#toLatin1">toLatin1</a>(), <a href="qstringref.html#toLocal8Bit">toLocal8Bit</a>(), and <a href="qtextcodec.html">QTextCodec</a>.</p>
<!-- @@@toUcs4 -->
<!-- $$$toUtf8[overload1]$$$toUtf8 -->
<h3 class="fn" id="toUtf8"><a name="toUtf8"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QStringRef::<span class="name">toUtf8</span>() const</h3>
<p>Returns a UTF-8 representation of the string as a <a href="qbytearray.html">QByteArray</a>.</p>
<p>UTF-8 is a Unicode codec and can represent all characters in a Unicode string like <a href="qstring.html">QString</a>.</p>
<p>This function was introduced in  Qt 4.8.</p>
<p><b>See also </b><a href="qstringref.html#toLatin1">toLatin1</a>(), <a href="qstringref.html#toLocal8Bit">toLocal8Bit</a>(), and <a href="qtextcodec.html">QTextCodec</a>.</p>
<!-- @@@toUtf8 -->
<!-- $$$trimmed[overload1]$$$trimmed -->
<h3 class="fn" id="trimmed"><a name="trimmed"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> QStringRef::<span class="name">trimmed</span>() const</h3>
<p>Returns a string that has whitespace removed from the start and the end.</p>
<p>Whitespace means any character for which <a href="qchar.html#isSpace">QChar::isSpace</a>() returns <code>true</code>. This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.</p>
<p>Unlike <a href="qstring.html#simplified">QString::simplified</a>(), trimmed() leaves internal whitespace alone.</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qstring.html#trimmed">QString::trimmed</a>().</p>
<!-- @@@trimmed -->
<!-- $$$truncate[overload1]$$$truncateint -->
<h3 class="fn" id="truncate"><a name="truncate"></a><span class="type">void</span> QStringRef::<span class="name">truncate</span>(<span class="type">int</span> <i>position</i>)</h3>
<p>Truncates the string at the given <i>position</i> index.</p>
<p>If the specified <i>position</i> index is beyond the end of the string, nothing happens.</p>
<p>If <i>position</i> is negative, it is equivalent to passing zero.</p>
<p>This function was introduced in  Qt 5.6.</p>
<p><b>See also </b><a href="qstring.html#truncate">QString::truncate</a>().</p>
<!-- @@@truncate -->
<!-- $$$unicode[overload1]$$$unicode -->
<h3 class="fn" id="unicode"><a name="unicode"></a>const <span class="type"><a href="qchar.html">QChar</a></span> *QStringRef::<span class="name">unicode</span>() const</h3>
<p>Returns a Unicode representation of the string reference. Since the data stems directly from the referenced string, it is not null-terminated unless the string reference includes the string's null terminator.</p>
<p><b>See also </b><a href="qstringref.html#string">string</a>().</p>
<!-- @@@unicode -->
<!-- $$$operator!=[overload1]$$$operator!=constchar* -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QStringRef::<span class="name">operator!=</span>(const <span class="type">char</span> *<i>s</i>) const</h3>
<p>This function overloads operator!=().</p>
<p>The <i>s</i> const char pointer is converted to a <a href="qstringref.html">QStringRef</a> using the fromUtf8() function.</p>
<p>You can disable this operator by defining <code>QT_NO_CAST_FROM_ASCII</code> when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through <a href="qobject.html#tr">QObject::tr</a>(), for example.</p>
<p>Returns <code>true</code> if this string is not lexically equal to the parameter string <i>s</i>. Otherwise returns <code>false</code>.</p>
<!-- @@@operator!= -->
<!-- $$$operator<[overload1]$$$operator<constchar* -->
<h3 class="fn" id="operator-lt"><a name="operator-lt"></a><span class="type">bool</span> QStringRef::<span class="name">operator&lt;</span>(const <span class="type">char</span> *<i>s</i>) const</h3>
<p>This function overloads operator&lt;().</p>
<p>The <i>s</i> const char pointer is converted to a <a href="qstringref.html">QStringRef</a> using the fromUtf8() function.</p>
<p>You can disable this operator by defining <code>QT_NO_CAST_FROM_ASCII</code> when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through <a href="qobject.html#tr">QObject::tr</a>(), for example.</p>
<p>Returns <code>true</code> if this string is lexically smaller than the parameter string <i>s</i>. Otherwise returns <code>false</code>.</p>
<!-- @@@operator< -->
<!-- $$$operator<=[overload1]$$$operator<=constchar* -->
<h3 class="fn" id="operator-lt-eq"><a name="operator-lt-eq"></a><span class="type">bool</span> QStringRef::<span class="name">operator&lt;=</span>(const <span class="type">char</span> *<i>s</i>) const</h3>
<p>This function overloads operator&lt;=().</p>
<p>The <i>s</i> const char pointer is converted to a <a href="qstringref.html">QStringRef</a> using the fromUtf8() function.</p>
<p>You can disable this operator by defining <code>QT_NO_CAST_FROM_ASCII</code> when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through <a href="qobject.html#tr">QObject::tr</a>(), for example.</p>
<p>Returns <code>true</code> if this string is lexically smaller than or equal to the parameter string <i>s</i>. Otherwise returns <code>false</code>.</p>
<!-- @@@operator<= -->
<!-- $$$operator=[overload1]$$$operator=QStringRef&& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;QStringRef::<span class="name">operator=</span>(<span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;&amp;<i>other</i>)</h3>
<p>Move-assignment operator.</p><!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQStringRef& -->
<h3 class="fn" id="operator-eq-1"><a name="operator-eq-1"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;QStringRef::<span class="name">operator=</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>other</i>)</h3>
<p>Assigns the <i>other</i> string reference to this string reference, and returns the result.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQString* -->
<h3 class="fn" id="operator-eq-2"><a name="operator-eq-2"></a><span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;QStringRef::<span class="name">operator=</span>(const <span class="type"><a href="qstring.html">QString</a></span> *<i>string</i>)</h3>
<p>Constructs a string reference to the given <i>string</i> and assigns it to this string reference, returning the result.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constchar* -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QStringRef::<span class="name">operator==</span>(const <span class="type">char</span> *<i>s</i>) const</h3>
<p>This function overloads operator==().</p>
<p>The <i>s</i> byte array is converted to a <a href="qstringref.html">QStringRef</a> using the fromUtf8() function. This function stops conversion at the first NUL character found, or the end of the byte array.</p>
<p>You can disable this operator by defining <code>QT_NO_CAST_FROM_ASCII</code> when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through <a href="qobject.html#tr">QObject::tr</a>(), for example.</p>
<p>Returns <code>true</code> if this string is lexically equal to the parameter string <i>s</i>. Otherwise returns <code>false</code>.</p>
<!-- @@@operator== -->
<!-- $$$operator>[overload1]$$$operator>constchar* -->
<h3 class="fn" id="operator-gt"><a name="operator-gt"></a><span class="type">bool</span> QStringRef::<span class="name">operator&gt;</span>(const <span class="type">char</span> *<i>s</i>) const</h3>
<p>This function overloads operator&gt;().</p>
<p>The <i>s</i> const char pointer is converted to a <a href="qstringref.html">QStringRef</a> using the fromUtf8() function.</p>
<p>You can disable this operator by defining <code>QT_NO_CAST_FROM_ASCII</code> when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through <a href="qobject.html#tr">QObject::tr</a>(), for example.</p>
<p>Returns <code>true</code> if this string is lexically greater than the parameter string <i>s</i>. Otherwise returns <code>false</code>.</p>
<!-- @@@operator> -->
<!-- $$$operator>=[overload1]$$$operator>=constchar* -->
<h3 class="fn" id="operator-gt-eq"><a name="operator-gt-eq"></a><span class="type">bool</span> QStringRef::<span class="name">operator&gt;=</span>(const <span class="type">char</span> *<i>s</i>) const</h3>
<p>This function overloads operator&gt;=().</p>
<p>The <i>s</i> const char pointer is converted to a <a href="qstringref.html">QStringRef</a> using the fromUtf8() function.</p>
<p>You can disable this operator by defining <code>QT_NO_CAST_FROM_ASCII</code> when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through <a href="qobject.html#tr">QObject::tr</a>(), for example.</p>
<p>Returns <code>true</code> if this string is lexically greater than or equal to the parameter string <i>s</i>. Otherwise returns <code>false</code>.</p>
<!-- @@@operator>= -->
<!-- $$$operator[][overload1]$$$operator[]int -->
<h3 class="fn" id="operator-5b-5d"><a name="operator-5b-5d"></a><span class="type"><a href="qchar.html">QChar</a></span> QStringRef::<span class="name">operator[]</span>(<span class="type">int</span> <i>position</i>) const</h3>
<p>Returns the character at the given index <i>position</i> in the string reference.</p>
<p>The <i>position</i> must be a valid index position in the string reference (i.e&#x2e;, 0 &lt;= <i>position</i> &lt; <a href="qstringref.html#size">size</a>()).</p>
<p>This function was introduced in  Qt 5.7.</p>
<p><b>See also </b><a href="qstringref.html#at">at</a>().</p>
<!-- @@@operator[] -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<$$$operator<constQStringRef&constQStringRef& -->
<h3 class="fn" id="operator-lt-1"><a name="operator-lt-1"></a><span class="type">bool</span> <span class="name">operator&lt;</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>Returns <code>true</code> if string reference <i>s1</i> is lexically less than string reference <i>s2</i>; otherwise returns <code>false</code>.</p>
<p>The comparison is based exclusively on the numeric Unicode values of the characters and is very fast, but is not what a human would expect. Consider sorting user-interface strings using the <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>() function.</p>
<!-- @@@operator< -->
<!-- $$$operator<=$$$operator<=constQStringRef&constQStringRef& -->
<h3 class="fn" id="operator-lt-eq-1"><a name="operator-lt-eq-1"></a><span class="type">bool</span> <span class="name">operator&lt;=</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>Returns <code>true</code> if string reference <i>s1</i> is lexically less than or equal to string reference <i>s2</i>; otherwise returns <code>false</code>.</p>
<p>The comparison is based exclusively on the numeric Unicode values of the characters and is very fast, but is not what a human would expect. Consider sorting user-interface strings using the <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>() function.</p>
<!-- @@@operator<= -->
<!-- $$$operator==$$$operator==constQStringRef&constQStringRef& -->
<h3 class="fn" id="operator-eq-eq-1"><a name="operator-eq-eq-1"></a><span class="type">bool</span> <span class="name">operator==</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>Returns <code>true</code> if string reference <i>s1</i> is lexically equal to string reference <i>s2</i>; otherwise returns <code>false</code>.</p>
<!-- @@@operator== -->
<!-- $$$operator==$$$operator==constQString&constQStringRef& -->
<h3 class="fn" id="operator-eq-eq-2"><a name="operator-eq-eq-2"></a><span class="type">bool</span> <span class="name">operator==</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>Returns <code>true</code> if string <i>s1</i> is lexically equal to string reference <i>s2</i>; otherwise returns <code>false</code>.</p>
<!-- @@@operator== -->
<!-- $$$operator==$$$operator==QLatin1StringconstQStringRef& -->
<h3 class="fn" id="operator-eq-eq-3"><a name="operator-eq-eq-3"></a><span class="type">bool</span> <span class="name">operator==</span>(<span class="type"><a href="qlatin1string.html">QLatin1String</a></span> <i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>Returns <code>true</code> if string <i>s1</i> is lexically equal to string reference <i>s2</i>; otherwise returns <code>false</code>.</p>
<!-- @@@operator== -->
<!-- $$$operator>$$$operator>constQStringRef&constQStringRef& -->
<h3 class="fn" id="operator-gt-1"><a name="operator-gt-1"></a><span class="type">bool</span> <span class="name">operator&gt;</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>Returns <code>true</code> if string reference <i>s1</i> is lexically greater than string reference <i>s2</i>; otherwise returns <code>false</code>.</p>
<p>The comparison is based exclusively on the numeric Unicode values of the characters and is very fast, but is not what a human would expect. Consider sorting user-interface strings using the <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>() function.</p>
<!-- @@@operator> -->
<!-- $$$operator>=$$$operator>=constQStringRef&constQStringRef& -->
<h3 class="fn" id="operator-gt-eq-1"><a name="operator-gt-eq-1"></a><span class="type">bool</span> <span class="name">operator&gt;=</span>(const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s1</i>, const <span class="type"><a href="qstringref.html#QStringRef">QStringRef</a></span> &amp;<i>s2</i>)</h3>
<p>Returns <code>true</code> if string reference <i>s1</i> is lexically greater than or equal to string reference <i>s2</i>; otherwise returns <code>false</code>.</p>
<p>The comparison is based exclusively on the numeric Unicode values of the characters and is very fast, but is not what a human would expect. Consider sorting user-interface strings using the <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>() function.</p>
<!-- @@@operator>= -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>