<?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>QLatin1String Class | Qt Core 5.12.6</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.12</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QLatin1String</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtcore-index.html">Qt 5.12.6 Reference Documentation</a></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="#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">QLatin1String Class</h1> <!-- $$$QLatin1String-brief --> <p>The <a href="qlatin1string.html">QLatin1String</a> class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal. <a href="#details">More...</a></p> <!-- @@@QLatin1String --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QLatin1String></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr></table></div><ul> <li><a href="qlatin1string-members.html">List of all members, including inherited 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"> </td><td class="memItemRight bottomAlign"><b></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.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="qlatin1string.html#const_reference-typedef">const_reference</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#const_reverse_iterator-typedef">const_reverse_iterator</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#difference_type-typedef">difference_type</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#iterator-typedef">iterator</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#reference-typedef">reference</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#reverse_iterator-typedef">reverse_iterator</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#size_type-typedef">size_type</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#value_type-typedef">value_type</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="qlatin1string.html#QLatin1String">QLatin1String</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#QLatin1String-1">QLatin1String</a></b>(const char *<i>str</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#QLatin1String-2">QLatin1String</a></b>(const char *<i>first</i>, const char *<i>last</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#QLatin1String-3">QLatin1String</a></b>(const char *<i>str</i>, int <i>size</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#QLatin1String-4">QLatin1String</a></b>(const QByteArray &<i>str</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1Char </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#at">at</a></b>(int <i>pos</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1Char </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#back">back</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#begin">begin</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#cbegin">cbegin</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#cend">cend</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#chop">chop</a></b>(int <i>length</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#chopped">chopped</a></b>(int <i>length</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#crbegin">crbegin</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#crend">crend</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const char *</td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#data">data</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#end">end</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#endsWith">endsWith</a></b>(QStringView <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="qlatin1string.html#endsWith-1">endsWith</a></b>(QLatin1String <i>l1</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="qlatin1string.html#endsWith-2">endsWith</a></b>(QChar <i>ch</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#endsWith-3">endsWith</a></b>(QChar <i>ch</i>, Qt::CaseSensitivity <i>cs</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1Char </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#front">front</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#isEmpty">isEmpty</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#isNull">isNull</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const char *</td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#latin1">latin1</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#left">left</a></b>(int <i>length</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#mid">mid</a></b>(int <i>start</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#mid-1">mid</a></b>(int <i>start</i>, int <i>length</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#rbegin">rbegin</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String::const_reverse_iterator </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#rend">rend</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#right">right</a></b>(int <i>length</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#size">size</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#startsWith">startsWith</a></b>(QStringView <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="qlatin1string.html#startsWith-1">startsWith</a></b>(QLatin1String <i>l1</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="qlatin1string.html#startsWith-2">startsWith</a></b>(QChar <i>ch</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#startsWith-3">startsWith</a></b>(QChar <i>ch</i>, Qt::CaseSensitivity <i>cs</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1String </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#trimmed">trimmed</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#truncate">truncate</a></b>(int <i>length</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-not-eq">operator!=</a></b>(const QString &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-not-eq-1">operator!=</a></b>(const char *<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-not-eq-2">operator!=</a></b>(const QByteArray &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt">operator<</a></b>(const QString &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt-1">operator<</a></b>(const char *<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt-2">operator<</a></b>(const QByteArray &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt-eq">operator<=</a></b>(const QString &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt-eq-1">operator<=</a></b>(const char *<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt-eq-2">operator<=</a></b>(const QByteArray &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-eq-eq">operator==</a></b>(const QString &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-eq-eq-1">operator==</a></b>(const char *<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-eq-eq-2">operator==</a></b>(const QByteArray &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt">operator></a></b>(const QString &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt-1">operator></a></b>(const char *<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt-2">operator></a></b>(const QByteArray &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt-eq">operator>=</a></b>(const QString &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt-eq-1">operator>=</a></b>(const char *<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt-eq-2">operator>=</a></b>(const QByteArray &<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QLatin1Char </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-5b-5d">operator[]</a></b>(int <i>pos</i>) const</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="qlatin1string.html#operator-not-eq-3">operator!=</a></b>(QLatin1String <i>s1</i>, QLatin1String <i>s2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt-3">operator<</a></b>(QLatin1String <i>s1</i>, QLatin1String <i>s2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-lt-eq-3">operator<=</a></b>(QLatin1String <i>s1</i>, QLatin1String <i>s2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-eq-eq-3">operator==</a></b>(QLatin1String <i>s1</i>, QLatin1String <i>s2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt-3">operator></a></b>(QLatin1String <i>s1</i>, QLatin1String <i>s2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlatin1string.html#operator-gt-eq-3">operator>=</a></b>(QLatin1String <i>s1</i>, QLatin1String <i>s2</i>)</td></tr> </table></div> <a name="details"></a> <!-- $$$QLatin1String-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qlatin1string.html">QLatin1String</a> class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.</p> <p>Many of <a href="qstring.html">QString</a>'s member functions are overloaded to accept <code>const char *</code> instead of <a href="qstring.html">QString</a>. This includes the copy constructor, the assignment operator, the comparison operators, and various other functions such as <a href="qstring.html#insert">insert()</a>, <a href="qstring.html#replace">replace()</a>, and <a href="qstring.html#indexOf">indexOf()</a>. These functions are usually optimized to avoid constructing a <a href="qstring.html">QString</a> object for the <code>const char *</code> data. For example, assuming <code>str</code> is a <a href="qstring.html">QString</a>,</p> <pre class="cpp"> <span class="keyword">if</span> (str <span class="operator">=</span><span class="operator">=</span> <span class="string">"auto"</span> <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> <span class="string">"extern"</span> <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> <span class="string">"static"</span> <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> <span class="string">"register"</span>) { <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> } </pre> <p>is much faster than</p> <pre class="cpp"> <span class="keyword">if</span> (str <span class="operator">=</span><span class="operator">=</span> <span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"auto"</span>) <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> <span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"extern"</span>) <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> <span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"static"</span>) <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> <span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"register"</span>)) { <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> } </pre> <p>because it doesn't construct four temporary <a href="qstring.html">QString</a> objects and make a deep copy of the character data.</p> <p>Applications that define <code>QT_NO_CAST_FROM_ASCII</code> (as explained in the <a href="qstring.html">QString</a> documentation) don't have access to <a href="qstring.html">QString</a>'s <code>const char *</code> API. To provide an efficient way of specifying constant Latin-1 strings, Qt provides the <a href="qlatin1string.html">QLatin1String</a>, which is just a very thin wrapper around a <code>const char *</code>. Using <a href="qlatin1string.html">QLatin1String</a>, the example code above becomes</p> <pre class="cpp"> <span class="keyword">if</span> (str <span class="operator">=</span><span class="operator">=</span> QLatin1String(<span class="string">"auto"</span>) <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> QLatin1String(<span class="string">"extern"</span>) <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> QLatin1String(<span class="string">"static"</span>) <span class="operator">|</span><span class="operator">|</span> str <span class="operator">=</span><span class="operator">=</span> QLatin1String(<span class="string">"register"</span>) { <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span> } </pre> <p>This is a bit longer to type, but it provides exactly the same benefits as the first version of the code, and is faster than converting the Latin-1 strings using <a href="qstring.html#fromLatin1">QString::fromLatin1</a>().</p> <p>Thanks to the <a href="qstring.html">QString</a>(<a href="qlatin1string.html">QLatin1String</a>) constructor, <a href="qlatin1string.html">QLatin1String</a> can be used everywhere a <a href="qstring.html">QString</a> is expected. For example:</p> <pre class="cpp"> <span class="type"><a href="../qtwidgets/qlabel.html">QLabel</a></span> <span class="operator">*</span>label <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="../qtwidgets/qlabel.html">QLabel</a></span>(QLatin1String(<span class="string">"MOD"</span>)<span class="operator">,</span> <span class="keyword">this</span>); </pre> <p><b>Note: </b>If the function you're calling with a <a href="qlatin1string.html">QLatin1String</a> argument isn't actually overloaded to take <a href="qlatin1string.html">QLatin1String</a>, the implicit conversion to <a href="qstring.html">QString</a> will trigger a memory allocation, which is usually what you want to avoid by using <a href="qlatin1string.html">QLatin1String</a> in the first place. In those cases, using <a href="qstring.html#QStringLiteral">QStringLiteral</a> may be the better option.</p></div> <p><b>See also </b><a href="qstring.html">QString</a>, <a href="qlatin1char.html">QLatin1Char</a>, <a href="qstring.html#QStringLiteral">QStringLiteral</a>, and <a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@QLatin1String --> <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$const_iterator --> <h3 class="fn" id="const_iterator-typedef"><a name="const_iterator-typedef"></a>typedef QLatin1String::<span class="name">const_iterator</span></h3> <p>This typedef provides an STL-style const iterator for <a href="qlatin1string.html">QLatin1String</a>.</p> <p>This typedef was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#iterator-typedef">iterator</a> and <a href="qlatin1string.html#const_reverse_iterator-typedef">const_reverse_iterator</a>.</p> <!-- @@@const_iterator --> <!-- $$$const_reference --> <h3 class="fn" id="const_reference-typedef"><a name="const_reference-typedef"></a>typedef QLatin1String::<span class="name">const_reference</span></h3> <p>Alias for <code>reference</code>. Provided for compatibility with the STL.</p> <p>This typedef was introduced in Qt 5.11.</p> <!-- @@@const_reference --> <!-- $$$const_reverse_iterator --> <h3 class="fn" id="const_reverse_iterator-typedef"><a name="const_reverse_iterator-typedef"></a>typedef QLatin1String::<span class="name">const_reverse_iterator</span></h3> <p>This typedef provides an STL-style const reverse iterator for <a href="qlatin1string.html">QLatin1String</a>.</p> <p>This typedef was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#reverse_iterator-typedef">reverse_iterator</a> and <a href="qlatin1string.html#const_iterator-typedef">const_iterator</a>.</p> <!-- @@@const_reverse_iterator --> <!-- $$$difference_type --> <h3 class="fn" id="difference_type-typedef"><a name="difference_type-typedef"></a>typedef QLatin1String::<span class="name">difference_type</span></h3> <p>Alias for <code>int</code>. Provided for compatibility with the STL.</p> <p>This typedef was introduced in Qt 5.10.</p> <!-- @@@difference_type --> <!-- $$$iterator --> <h3 class="fn" id="iterator-typedef"><a name="iterator-typedef"></a>typedef QLatin1String::<span class="name">iterator</span></h3> <p>This typedef provides an STL-style const iterator for <a href="qlatin1string.html">QLatin1String</a>.</p> <p><a href="qlatin1string.html">QLatin1String</a> does not support mutable iterators, so this is the same as <a href="qlatin1string.html#const_iterator-typedef">const_iterator</a>.</p> <p>This typedef was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#const_iterator-typedef">const_iterator</a> and <a href="qlatin1string.html#reverse_iterator-typedef">reverse_iterator</a>.</p> <!-- @@@iterator --> <!-- $$$reference --> <h3 class="fn" id="reference-typedef"><a name="reference-typedef"></a>typedef QLatin1String::<span class="name">reference</span></h3> <p>Alias for <code>value_type &</code>. Provided for compatibility with the STL.</p> <p>This typedef was introduced in Qt 5.10.</p> <!-- @@@reference --> <!-- $$$reverse_iterator --> <h3 class="fn" id="reverse_iterator-typedef"><a name="reverse_iterator-typedef"></a>typedef QLatin1String::<span class="name">reverse_iterator</span></h3> <p>This typedef provides an STL-style const reverse iterator for <a href="qlatin1string.html">QLatin1String</a>.</p> <p><a href="qlatin1string.html">QLatin1String</a> does not support mutable reverse iterators, so this is the same as <a href="qlatin1string.html#const_reverse_iterator-typedef">const_reverse_iterator</a>.</p> <p>This typedef was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#const_reverse_iterator-typedef">const_reverse_iterator</a> and <a href="qlatin1string.html#iterator-typedef">iterator</a>.</p> <!-- @@@reverse_iterator --> <!-- $$$size_type --> <h3 class="fn" id="size_type-typedef"><a name="size_type-typedef"></a>typedef QLatin1String::<span class="name">size_type</span></h3> <p>Alias for <code>int</code>. Provided for compatibility with the STL.</p> <p>This typedef was introduced in Qt 5.10.</p> <!-- @@@size_type --> <!-- $$$value_type --> <h3 class="fn" id="value_type-typedef"><a name="value_type-typedef"></a>typedef QLatin1String::<span class="name">value_type</span></h3> <p>Alias for <code>const char</code>. Provided for compatibility with the STL.</p> <p>This typedef was introduced in Qt 5.10.</p> <!-- @@@value_type --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$ --> <div class="fngroup"> <h3 class="fn fngroupitem" id="endsWith"><a name="endsWith"></a><span class="type">bool</span> QLatin1String::<span class="name">endsWith</span>(<span class="type"><a href="qstringview.html">QStringView</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><h3 class="fn fngroupitem" id="endsWith-1"><a name="endsWith-1"></a><span class="type">bool</span> QLatin1String::<span class="name">endsWith</span>(<span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>l1</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3><h3 class="fn fngroupitem" id="endsWith-2"><a name="endsWith-2"></a><span class="type">bool</span> QLatin1String::<span class="name">endsWith</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>) const</h3><h3 class="fn fngroupitem" id="endsWith-3"><a name="endsWith-3"></a><span class="type">bool</span> QLatin1String::<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>) const</h3></div> <p>Returns <code>true</code> if this Latin-1 string ends with string-view <i>str</i>, Latin-1 string <i>l1</i>, or character <i>ch</i>, respectively; otherwise returns <code>false</code>.</p> <p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (the default), the search is case-sensitive; otherwise the search is case-insensitive.</p> <p>This documentation was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#startsWith">startsWith</a>().</p> <!-- @@@ --> <!-- $$$ --> <div class="fngroup"> <h3 class="fn fngroupitem" id="startsWith"><a name="startsWith"></a><span class="type">bool</span> QLatin1String::<span class="name">startsWith</span>(<span class="type"><a href="qstringview.html">QStringView</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><h3 class="fn fngroupitem" id="startsWith-1"><a name="startsWith-1"></a><span class="type">bool</span> QLatin1String::<span class="name">startsWith</span>(<span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>l1</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>cs</i> = Qt::CaseSensitive) const</h3><h3 class="fn fngroupitem" id="startsWith-2"><a name="startsWith-2"></a><span class="type">bool</span> QLatin1String::<span class="name">startsWith</span>(<span class="type"><a href="qchar.html">QChar</a></span> <i>ch</i>) const</h3><h3 class="fn fngroupitem" id="startsWith-3"><a name="startsWith-3"></a><span class="type">bool</span> QLatin1String::<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>) const</h3></div> <p>Returns <code>true</code> if this Latin-1 string starts with string-view <i>str</i>, Latin-1 string <i>l1</i>, or character <i>ch</i>, respectively; otherwise returns <code>false</code>.</p> <p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (the default), the search is case-sensitive; otherwise the search is case-insensitive.</p> <p>This documentation was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#endsWith">endsWith</a>().</p> <!-- @@@ --> <!-- $$$QLatin1String[overload1]$$$QLatin1String --> <h3 class="fn" id="QLatin1String"><a name="QLatin1String"></a>QLatin1String::<span class="name">QLatin1String</span>()</h3> <p>Constructs a <a href="qlatin1string.html">QLatin1String</a> object that stores a nullptr.</p> <p>This function was introduced in Qt 5.6.</p> <!-- @@@QLatin1String --> <!-- $$$QLatin1String$$$QLatin1Stringconstchar* --> <h3 class="fn" id="QLatin1String-1"><a name="QLatin1String-1"></a>QLatin1String::<span class="name">QLatin1String</span>(const <span class="type">char</span> *<i>str</i>)</h3> <p>Constructs a <a href="qlatin1string.html">QLatin1String</a> object that stores <i>str</i>.</p> <p>The string data is <i>not</i> copied. The caller must be able to guarantee that <i>str</i> will not be deleted or modified as long as the <a href="qlatin1string.html">QLatin1String</a> object exists.</p> <p><b>See also </b><a href="qlatin1string.html#latin1">latin1</a>().</p> <!-- @@@QLatin1String --> <!-- $$$QLatin1String$$$QLatin1Stringconstchar*constchar* --> <h3 class="fn" id="QLatin1String-2"><a name="QLatin1String-2"></a>QLatin1String::<span class="name">QLatin1String</span>(const <span class="type">char</span> *<i>first</i>, const <span class="type">char</span> *<i>last</i>)</h3> <p>Constructs a <a href="qlatin1string.html">QLatin1String</a> object that stores <i>first</i> with length (<i>last</i> - <i>first</i>).</p> <p>The range <code>[first,last)</code> must remain valid for the lifetime of this Latin-1 string object.</p> <p>Passing <code>nullptr</code> as <i>first</i> is safe if <i>last</i> is <code>nullptr</code>, too, and results in a null Latin-1 string.</p> <p>The behavior is undefined if <i>last</i> precedes <i>first</i>, <i>first</i> is <code>nullptr</code> and <i>last</i> is not, or if <code>last - first > INT_MAX</code>.</p> <p>This function was introduced in Qt 5.10.</p> <!-- @@@QLatin1String --> <!-- $$$QLatin1String$$$QLatin1Stringconstchar*int --> <h3 class="fn" id="QLatin1String-3"><a name="QLatin1String-3"></a>QLatin1String::<span class="name">QLatin1String</span>(const <span class="type">char</span> *<i>str</i>, <span class="type">int</span> <i>size</i>)</h3> <p>Constructs a <a href="qlatin1string.html">QLatin1String</a> object that stores <i>str</i> with <i>size</i>.</p> <p>The string data is <i>not</i> copied. The caller must be able to guarantee that <i>str</i> will not be deleted or modified as long as the <a href="qlatin1string.html">QLatin1String</a> object exists.</p> <p><b>See also </b><a href="qlatin1string.html#latin1">latin1</a>().</p> <!-- @@@QLatin1String --> <!-- $$$QLatin1String$$$QLatin1StringconstQByteArray& --> <h3 class="fn" id="QLatin1String-4"><a name="QLatin1String-4"></a>QLatin1String::<span class="name">QLatin1String</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>str</i>)</h3> <p>Constructs a <a href="qlatin1string.html">QLatin1String</a> object that stores <i>str</i>.</p> <p>The string data is <i>not</i> copied. The caller must be able to guarantee that <i>str</i> will not be deleted or modified as long as the <a href="qlatin1string.html">QLatin1String</a> object exists.</p> <p><b>See also </b><a href="qlatin1string.html#latin1">latin1</a>().</p> <!-- @@@QLatin1String --> <!-- $$$at[overload1]$$$atint --> <h3 class="fn" id="at"><a name="at"></a><span class="type"><a href="qlatin1char.html">QLatin1Char</a></span> QLatin1String::<span class="name">at</span>(<span class="type">int</span> <i>pos</i>) const</h3> <p>Returns the character at position <i>pos</i> in this object.</p> <p><b>Note: </b>This function performs no error checking. The behavior is undefined when <i>pos</i> < 0 or <i>pos</i> >= <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.8.</p> <p><b>See also </b><a href="qlatin1string.html#operator-5b-5d">operator[]</a>().</p> <!-- @@@at --> <!-- $$$back[overload1]$$$back --> <h3 class="fn" id="back"><a name="back"></a><span class="type"><a href="qlatin1char.html">QLatin1Char</a></span> QLatin1String::<span class="name">back</span>() const</h3> <p>Returns the last character in the string. Same as <code>at(size() - 1)</code>.</p> <p>This function is provided for STL compatibility.</p> <p><b>Warning:</b> Calling this function on an empty string constitutes undefined behavior.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#front">front</a>(), <a href="qlatin1string.html#at">at</a>(), and <a href="qlatin1string.html#operator-5b-5d">operator[]</a>().</p> <!-- @@@back --> <!-- $$$begin[overload1]$$$begin --> <h3 class="fn" id="begin"><a name="begin"></a><span class="type"><a href="qlatin1string.html#const_iterator-typedef">QLatin1String::const_iterator</a></span> QLatin1String::<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 is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#end">end</a>(), <a href="qlatin1string.html#cbegin">cbegin</a>(), <a href="qlatin1string.html#rbegin">rbegin</a>(), and <a href="qlatin1string.html#data">data</a>().</p> <!-- @@@begin --> <!-- $$$cbegin[overload1]$$$cbegin --> <h3 class="fn" id="cbegin"><a name="cbegin"></a><span class="type"><a href="qlatin1string.html#const_iterator-typedef">QLatin1String::const_iterator</a></span> QLatin1String::<span class="name">cbegin</span>() const</h3> <p>Same as <a href="qlatin1string.html#begin">begin</a>().</p> <p>This function is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#cend">cend</a>(), <a href="qlatin1string.html#begin">begin</a>(), <a href="qlatin1string.html#crbegin">crbegin</a>(), and <a href="qlatin1string.html#data">data</a>().</p> <!-- @@@cbegin --> <!-- $$$cend[overload1]$$$cend --> <h3 class="fn" id="cend"><a name="cend"></a><span class="type"><a href="qlatin1string.html#const_iterator-typedef">QLatin1String::const_iterator</a></span> QLatin1String::<span class="name">cend</span>() const</h3> <p>Same as <a href="qlatin1string.html#end">end</a>().</p> <p>This function is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#cbegin">cbegin</a>(), <a href="qlatin1string.html#end">end</a>(), and <a href="qlatin1string.html#crend">crend</a>().</p> <!-- @@@cend --> <!-- $$$chop[overload1]$$$chopint --> <h3 class="fn" id="chop"><a name="chop"></a><span class="type">void</span> QLatin1String::<span class="name">chop</span>(<span class="type">int</span> <i>length</i>)</h3> <p>Truncates this string by <i>length</i> characters.</p> <p>Same as <code>*this = left(size() - length)</code>.</p> <p><b>Note: </b>The behavior is undefined when <i>length</i> < 0 or <i>length</i> > <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#mid">mid</a>(), <a href="qlatin1string.html#left">left</a>(), <a href="qlatin1string.html#right">right</a>(), <a href="qlatin1string.html#chopped">chopped</a>(), and <a href="qlatin1string.html#truncate">truncate</a>().</p> <!-- @@@chop --> <!-- $$$chopped[overload1]$$$choppedint --> <h3 class="fn" id="chopped"><a name="chopped"></a><span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> QLatin1String::<span class="name">chopped</span>(<span class="type">int</span> <i>length</i>) const</h3> <p>Returns the substring of length <a href="qlatin1string.html#size">size</a>() - <i>length</i> starting at the beginning of this object.</p> <p>Same as <code>left(size() - length)</code>.</p> <p><b>Note: </b>The behavior is undefined when <i>length</i> < 0 or <i>length</i> > <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#mid">mid</a>(), <a href="qlatin1string.html#left">left</a>(), <a href="qlatin1string.html#right">right</a>(), <a href="qlatin1string.html#chop">chop</a>(), and <a href="qlatin1string.html#truncate">truncate</a>().</p> <!-- @@@chopped --> <!-- $$$crbegin[overload1]$$$crbegin --> <h3 class="fn" id="crbegin"><a name="crbegin"></a><span class="type"><a href="qlatin1string.html#const_reverse_iterator-typedef">QLatin1String::const_reverse_iterator</a></span> QLatin1String::<span class="name">crbegin</span>() const</h3> <p>Same as <a href="qlatin1string.html#rbegin">rbegin</a>().</p> <p>This function is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#crend">crend</a>(), <a href="qlatin1string.html#rbegin">rbegin</a>(), and <a href="qlatin1string.html#cbegin">cbegin</a>().</p> <!-- @@@crbegin --> <!-- $$$crend[overload1]$$$crend --> <h3 class="fn" id="crend"><a name="crend"></a><span class="type"><a href="qlatin1string.html#const_reverse_iterator-typedef">QLatin1String::const_reverse_iterator</a></span> QLatin1String::<span class="name">crend</span>() const</h3> <p>Same as <a href="qlatin1string.html#rend">rend</a>().</p> <p>This function is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#crbegin">crbegin</a>(), <a href="qlatin1string.html#rend">rend</a>(), and <a href="qlatin1string.html#cend">cend</a>().</p> <!-- @@@crend --> <!-- $$$data[overload1]$$$data --> <h3 class="fn" id="data"><a name="data"></a>const <span class="type">char</span> *QLatin1String::<span class="name">data</span>() const</h3> <p>Returns the Latin-1 string stored in this object.</p> <!-- @@@data --> <!-- $$$end[overload1]$$$end --> <h3 class="fn" id="end"><a name="end"></a><span class="type"><a href="qlatin1string.html#const_iterator-typedef">QLatin1String::const_iterator</a></span> QLatin1String::<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 is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#begin">begin</a>(), <a href="qlatin1string.html#cend">cend</a>(), and <a href="qlatin1string.html#rend">rend</a>().</p> <!-- @@@end --> <!-- $$$front[overload1]$$$front --> <h3 class="fn" id="front"><a name="front"></a><span class="type"><a href="qlatin1char.html">QLatin1Char</a></span> QLatin1String::<span class="name">front</span>() const</h3> <p>Returns the first character in the string. Same as <code>at(0)</code>.</p> <p>This function is provided for STL compatibility.</p> <p><b>Warning:</b> Calling this function on an empty string constitutes undefined behavior.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#back">back</a>(), <a href="qlatin1string.html#at">at</a>(), and <a href="qlatin1string.html#operator-5b-5d">operator[]</a>().</p> <!-- @@@front --> <!-- $$$isEmpty[overload1]$$$isEmpty --> <h3 class="fn" id="isEmpty"><a name="isEmpty"></a><span class="type">bool</span> QLatin1String::<span class="name">isEmpty</span>() const</h3> <p>Returns whether the Latin-1 string stored in this object is empty (<code>size() == 0</code>) or not.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#isNull">isNull</a>() and <a href="qlatin1string.html#size">size</a>().</p> <!-- @@@isEmpty --> <!-- $$$isNull[overload1]$$$isNull --> <h3 class="fn" id="isNull"><a name="isNull"></a><span class="type">bool</span> QLatin1String::<span class="name">isNull</span>() const</h3> <p>Returns whether the Latin-1 string stored in this object is null (<code>data() == nullptr</code>) or not.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#isEmpty">isEmpty</a>() and <a href="qlatin1string.html#data">data</a>().</p> <!-- @@@isNull --> <!-- $$$latin1[overload1]$$$latin1 --> <h3 class="fn" id="latin1"><a name="latin1"></a>const <span class="type">char</span> *QLatin1String::<span class="name">latin1</span>() const</h3> <p>Returns the Latin-1 string stored in this object.</p> <!-- @@@latin1 --> <!-- $$$left[overload1]$$$leftint --> <h3 class="fn" id="left"><a name="left"></a><span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> QLatin1String::<span class="name">left</span>(<span class="type">int</span> <i>length</i>) const</h3> <p>Returns the substring of length <i>length</i> starting at position 0 in this object.</p> <p><b>Note: </b>This function performs no error checking. The behavior is undefined when <i>length</i> < 0 or <i>length</i> > <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.8.</p> <p><b>See also </b><a href="qlatin1string.html#mid">mid</a>(), <a href="qlatin1string.html#right">right</a>(), <a href="qlatin1string.html#chopped">chopped</a>(), <a href="qlatin1string.html#chop">chop</a>(), and <a href="qlatin1string.html#truncate">truncate</a>().</p> <!-- @@@left --> <!-- $$$mid[overload1]$$$midint --> <h3 class="fn" id="mid"><a name="mid"></a><span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> QLatin1String::<span class="name">mid</span>(<span class="type">int</span> <i>start</i>) const</h3> <p>Returns the substring starting at position <i>start</i> in this object, and extending to the end of the string.</p> <p><b>Note: </b>This function performs no error checking. The behavior is undefined when <i>start</i> < 0 or <i>start</i> > <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.8.</p> <p><b>See also </b><a href="qlatin1string.html#left">left</a>(), <a href="qlatin1string.html#right">right</a>(), <a href="qlatin1string.html#chopped">chopped</a>(), <a href="qlatin1string.html#chop">chop</a>(), and <a href="qlatin1string.html#truncate">truncate</a>().</p> <!-- @@@mid --> <!-- $$$mid$$$midintint --> <h3 class="fn" id="mid-1"><a name="mid-1"></a><span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> QLatin1String::<span class="name">mid</span>(<span class="type">int</span> <i>start</i>, <span class="type">int</span> <i>length</i>) const</h3> <p>This is an overloaded function.</p> <p>Returns the substring of length <i>length</i> starting at position <i>start</i> in this object.</p> <p><b>Note: </b>This function performs no error checking. The behavior is undefined when <i>start</i> < 0, <i>length</i> < 0, or <i>start</i> + <i>length</i> > <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.8.</p> <p><b>See also </b><a href="qlatin1string.html#left">left</a>(), <a href="qlatin1string.html#right">right</a>(), <a href="qlatin1string.html#chopped">chopped</a>(), <a href="qlatin1string.html#chop">chop</a>(), and <a href="qlatin1string.html#truncate">truncate</a>().</p> <!-- @@@mid --> <!-- $$$rbegin[overload1]$$$rbegin --> <h3 class="fn" id="rbegin"><a name="rbegin"></a><span class="type"><a href="qlatin1string.html#const_reverse_iterator-typedef">QLatin1String::const_reverse_iterator</a></span> QLatin1String::<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 is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#rend">rend</a>(), <a href="qlatin1string.html#crbegin">crbegin</a>(), and <a href="qlatin1string.html#begin">begin</a>().</p> <!-- @@@rbegin --> <!-- $$$rend[overload1]$$$rend --> <h3 class="fn" id="rend"><a name="rend"></a><span class="type"><a href="qlatin1string.html#const_reverse_iterator-typedef">QLatin1String::const_reverse_iterator</a></span> QLatin1String::<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 is provided for STL compatibility.</p> <p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#rbegin">rbegin</a>(), <a href="qlatin1string.html#crend">crend</a>(), and <a href="qlatin1string.html#end">end</a>().</p> <!-- @@@rend --> <!-- $$$right[overload1]$$$rightint --> <h3 class="fn" id="right"><a name="right"></a><span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> QLatin1String::<span class="name">right</span>(<span class="type">int</span> <i>length</i>) const</h3> <p>Returns the substring of length <i>length</i> starting at position <a href="qlatin1string.html#size">size</a>() - <i>length</i> in this object.</p> <p><b>Note: </b>This function performs no error checking. The behavior is undefined when <i>length</i> < 0 or <i>length</i> > <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.8.</p> <p><b>See also </b><a href="qlatin1string.html#mid">mid</a>(), <a href="qlatin1string.html#left">left</a>(), <a href="qlatin1string.html#chopped">chopped</a>(), <a href="qlatin1string.html#chop">chop</a>(), and <a href="qlatin1string.html#truncate">truncate</a>().</p> <!-- @@@right --> <!-- $$$size[overload1]$$$size --> <h3 class="fn" id="size"><a name="size"></a><span class="type">int</span> QLatin1String::<span class="name">size</span>() const</h3> <p>Returns the size of the Latin-1 string stored in this object.</p> <!-- @@@size --> <!-- $$$trimmed[overload1]$$$trimmed --> <h3 class="fn" id="trimmed"><a name="trimmed"></a><span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> QLatin1String::<span class="name">trimmed</span>() const</h3> <p>Strips leading and trailing whitespace and returns the result.</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>This function was introduced in Qt 5.10.</p> <!-- @@@trimmed --> <!-- $$$truncate[overload1]$$$truncateint --> <h3 class="fn" id="truncate"><a name="truncate"></a><span class="type">void</span> QLatin1String::<span class="name">truncate</span>(<span class="type">int</span> <i>length</i>)</h3> <p>Truncates this string to length <i>length</i>.</p> <p>Same as <code>*this = left(length)</code>.</p> <p><b>Note: </b>The behavior is undefined when <i>length</i> < 0 or <i>length</i> > <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.10.</p> <p><b>See also </b><a href="qlatin1string.html#mid">mid</a>(), <a href="qlatin1string.html#left">left</a>(), <a href="qlatin1string.html#right">right</a>(), <a href="qlatin1string.html#chopped">chopped</a>(), and <a href="qlatin1string.html#chop">chop</a>().</p> <!-- @@@truncate --> <!-- $$$operator!=[overload1]$$$operator!=constQString& --> <h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QLatin1String::<span class="name">operator!=</span>(const <span class="type"><a href="qstring.html">QString</a></span> &<i>other</i>) const</h3> <p>Returns <code>true</code> if this string is not equal to string <i>other</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 with <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>().</p> <!-- @@@operator!= --> <!-- $$$operator!=$$$operator!=constchar* --> <h3 class="fn" id="operator-not-eq-1"><a name="operator-not-eq-1"></a><span class="type">bool</span> QLatin1String::<span class="name">operator!=</span>(const <span class="type">char</span> *<i>other</i>) const</h3> <p>This function overloads <a href="qlatin1string.html#operator-not-eq">operator!=</a>().</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 4.3.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator!= --> <!-- $$$operator!=$$$operator!=constQByteArray& --> <h3 class="fn" id="operator-not-eq-2"><a name="operator-not-eq-2"></a><span class="type">bool</span> QLatin1String::<span class="name">operator!=</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>other</i>) const</h3> <p>This function overloads <a href="qlatin1string.html#operator-not-eq">operator!=</a>().</p> <p>The <i>other</i> byte array is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator!= --> <!-- $$$operator<[overload1]$$$operator<constQString& --> <h3 class="fn" id="operator-lt"><a name="operator-lt"></a><span class="type">bool</span> QLatin1String::<span class="name">operator<</span>(const <span class="type"><a href="qstring.html">QString</a></span> &<i>other</i>) const</h3> <p>Returns <code>true</code> if this string is lexically less than the <i>other</i> string; 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<constchar* --> <h3 class="fn" id="operator-lt-1"><a name="operator-lt-1"></a><span class="type">bool</span> QLatin1String::<span class="name">operator<</span>(const <span class="type">char</span> *<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 4.3.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator< --> <!-- $$$operator<$$$operator<constQByteArray& --> <h3 class="fn" id="operator-lt-2"><a name="operator-lt-2"></a><span class="type">bool</span> QLatin1String::<span class="name">operator<</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator< --> <!-- $$$operator<=[overload1]$$$operator<=constQString& --> <h3 class="fn" id="operator-lt-eq"><a name="operator-lt-eq"></a><span class="type">bool</span> QLatin1String::<span class="name">operator<=</span>(const <span class="type"><a href="qstring.html">QString</a></span> &<i>other</i>) const</h3> <p>Returns <code>true</code> if this string is lexically less than or equal to string <i>other</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 with <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>().</p> <!-- @@@operator<= --> <!-- $$$operator<=$$$operator<=constchar* --> <h3 class="fn" id="operator-lt-eq-1"><a name="operator-lt-eq-1"></a><span class="type">bool</span> QLatin1String::<span class="name">operator<=</span>(const <span class="type">char</span> *<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 4.3.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator<= --> <!-- $$$operator<=$$$operator<=constQByteArray& --> <h3 class="fn" id="operator-lt-eq-2"><a name="operator-lt-eq-2"></a><span class="type">bool</span> QLatin1String::<span class="name">operator<=</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> array is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator<= --> <!-- $$$operator==[overload1]$$$operator==constQString& --> <h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QLatin1String::<span class="name">operator==</span>(const <span class="type"><a href="qstring.html">QString</a></span> &<i>other</i>) const</h3> <p>Returns <code>true</code> if this string is equal to string <i>other</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 with <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>().</p> <!-- @@@operator== --> <!-- $$$operator==$$$operator==constchar* --> <h3 class="fn" id="operator-eq-eq-1"><a name="operator-eq-eq-1"></a><span class="type">bool</span> QLatin1String::<span class="name">operator==</span>(const <span class="type">char</span> *<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 4.3.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator== --> <!-- $$$operator==$$$operator==constQByteArray& --> <h3 class="fn" id="operator-eq-eq-2"><a name="operator-eq-eq-2"></a><span class="type">bool</span> QLatin1String::<span class="name">operator==</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> byte array is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator== --> <!-- $$$operator>[overload1]$$$operator>constQString& --> <h3 class="fn" id="operator-gt"><a name="operator-gt"></a><span class="type">bool</span> QLatin1String::<span class="name">operator></span>(const <span class="type"><a href="qstring.html">QString</a></span> &<i>other</i>) const</h3> <p>Returns <code>true</code> if this string is lexically greater than string <i>other</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 with <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>().</p> <!-- @@@operator> --> <!-- $$$operator>$$$operator>constchar* --> <h3 class="fn" id="operator-gt-1"><a name="operator-gt-1"></a><span class="type">bool</span> QLatin1String::<span class="name">operator></span>(const <span class="type">char</span> *<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 4.3.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator> --> <!-- $$$operator>$$$operator>constQByteArray& --> <h3 class="fn" id="operator-gt-2"><a name="operator-gt-2"></a><span class="type">bool</span> QLatin1String::<span class="name">operator></span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator> --> <!-- $$$operator>=[overload1]$$$operator>=constQString& --> <h3 class="fn" id="operator-gt-eq"><a name="operator-gt-eq"></a><span class="type">bool</span> QLatin1String::<span class="name">operator>=</span>(const <span class="type"><a href="qstring.html">QString</a></span> &<i>other</i>) const</h3> <p>Returns <code>true</code> if this string is lexically greater than or equal to string <i>other</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 with <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>().</p> <!-- @@@operator>= --> <!-- $$$operator>=$$$operator>=constchar* --> <h3 class="fn" id="operator-gt-eq-1"><a name="operator-gt-eq-1"></a><span class="type">bool</span> QLatin1String::<span class="name">operator>=</span>(const <span class="type">char</span> *<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> const char pointer is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 4.3.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator>= --> <!-- $$$operator>=$$$operator>=constQByteArray& --> <h3 class="fn" id="operator-gt-eq-2"><a name="operator-gt-eq-2"></a><span class="type">bool</span> QLatin1String::<span class="name">operator>=</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &<i>other</i>) const</h3> <p>This is an overloaded function.</p> <p>The <i>other</i> array is converted to a <a href="qstring.html">QString</a> using the <a href="qstring.html#fromUtf8">QString::fromUtf8</a>() 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>This function was introduced in Qt 5.0.</p> <p><b>See also </b><a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p> <!-- @@@operator>= --> <!-- $$$operator[][overload1]$$$operator[]int --> <h3 class="fn" id="operator-5b-5d"><a name="operator-5b-5d"></a><span class="type"><a href="qlatin1char.html">QLatin1Char</a></span> QLatin1String::<span class="name">operator[]</span>(<span class="type">int</span> <i>pos</i>) const</h3> <p>Returns the character at position <i>pos</i> in this object.</p> <p><b>Note: </b>This function performs no error checking. The behavior is undefined when <i>pos</i> < 0 or <i>pos</i> >= <a href="qlatin1string.html#size">size</a>().</p><p>This function was introduced in Qt 5.8.</p> <p><b>See also </b><a href="qlatin1string.html#at">at</a>().</p> <!-- @@@operator[] --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> <!-- $$$operator!=$$$operator!=QLatin1StringQLatin1String --> <h3 class="fn" id="operator-not-eq-3"><a name="operator-not-eq-3"></a><span class="type">bool</span> <span class="name">operator!=</span>(<span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s1</i>, <span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s2</i>)</h3> <p>Returns <code>true</code> if string <i>s1</i> is lexically unequal to string <i>s2</i>; otherwise returns <code>false</code>.</p> <!-- @@@operator!= --> <!-- $$$operator<$$$operator<QLatin1StringQLatin1String --> <h3 class="fn" id="operator-lt-3"><a name="operator-lt-3"></a><span class="type">bool</span> <span class="name">operator<</span>(<span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s1</i>, <span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s2</i>)</h3> <p>Returns <code>true</code> if string <i>s1</i> is lexically smaller than string <i>s2</i>; otherwise returns <code>false</code>.</p> <!-- @@@operator< --> <!-- $$$operator<=$$$operator<=QLatin1StringQLatin1String --> <h3 class="fn" id="operator-lt-eq-3"><a name="operator-lt-eq-3"></a><span class="type">bool</span> <span class="name">operator<=</span>(<span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s1</i>, <span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s2</i>)</h3> <p>Returns <code>true</code> if string <i>s1</i> is lexically smaller than or equal to string <i>s2</i>; otherwise returns <code>false</code>.</p> <!-- @@@operator<= --> <!-- $$$operator==$$$operator==QLatin1StringQLatin1String --> <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">QLatin1String</a></span> <i>s1</i>, <span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s2</i>)</h3> <p>Returns <code>true</code> if string <i>s1</i> is lexically equal to string <i>s2</i>; otherwise returns <code>false</code>.</p> <!-- @@@operator== --> <!-- $$$operator>$$$operator>QLatin1StringQLatin1String --> <h3 class="fn" id="operator-gt-3"><a name="operator-gt-3"></a><span class="type">bool</span> <span class="name">operator></span>(<span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s1</i>, <span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s2</i>)</h3> <p>Returns <code>true</code> if string <i>s1</i> is lexically greater than string <i>s2</i>; otherwise returns <code>false</code>.</p> <!-- @@@operator> --> <!-- $$$operator>=$$$operator>=QLatin1StringQLatin1String --> <h3 class="fn" id="operator-gt-eq-3"><a name="operator-gt-eq-3"></a><span class="type">bool</span> <span class="name">operator>=</span>(<span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s1</i>, <span class="type"><a href="qlatin1string.html#QLatin1String">QLatin1String</a></span> <i>s2</i>)</h3> <p>Returns <code>true</code> if string <i>s1</i> is lexically greater than or equal to string <i>s2</i>; otherwise returns <code>false</code>.</p> <!-- @@@operator>= --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 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>