<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Calibri","sans-serif";}
h3
        {mso-style-priority:9;
        mso-style-link:"\6807\9898 3 Char";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Arial","sans-serif";
        color:#363534;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:9.0pt;
        font-family:SimSun;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML \9884\8BBE\683C\5F0F Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:SimSun;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.3Char
        {mso-style-name:"\6807\9898 3 Char";
        mso-style-priority:9;
        mso-style-link:"\6807\9898 3";
        font-family:"Arial","sans-serif";
        color:#363534;}
span.HTMLChar
        {mso-style-name:"HTML \9884\8BBE\683C\5F0F Char";
        mso-style-priority:99;
        mso-style-link:"HTML \9884\8BBE\683C\5F0F";
        font-family:SimSun;}
span.comment
        {mso-style-name:comment;
        color:#008B00;
        font-style:italic;}
span.string1
        {mso-style-name:string1;
        color:#000084;}
span.number
        {mso-style-name:number;
        color:#A46200;}
span.operator
        {mso-style-name:operator;
        color:#202020;}
span.name1
        {mso-style-name:name1;
        color:black;}
span.type
        {mso-style-name:type;
        font-weight:bold;}
.MsoChpDefault
        {mso-style-type:export-only;}
 /* Page Definitions */
 @page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=Section1>

<h3 style='background:white'><a name=right></a><span class=type><span lang=EN>here
it says:<o:p></o:p></span></span></h3>

<h3 style='background:white'><span class=type><span lang=EN>------------------------------------------------------------------------------------------------<o:p></o:p></span></span></h3>

<h3 style='background:white'><span class=type><span lang=EN>QString</span></span><span
lang=EN> QString::</span><span class=name1><span lang=EN>right</span></span><span
lang=EN>(<span class=type>int</span><i> n</i>) const<o:p></o:p></span></h3>

<p style='background:white'><span lang=EN style='font-family:"Verdana","sans-serif";
color:#363534'>Returns a substring that contains the <i>n</i> rightmost
characters of the string.<o:p></o:p></span></p>

<p style='background:white'><span lang=EN style='font-family:"Verdana","sans-serif";
color:#363534'>The entire string is returned if <i>n</i> is greater than <a
href="http://qt-project.org/doc/qt-5.0/qtcore/qstring.html#size">size</a>() or
less than zero.<o:p></o:p></span></p>

<pre style='background:white'><span class=type><span lang=EN style='color:#363534'><a
href="http://qt-project.org/doc/qt-5.0/qtcore/qstring.html">QString</a></span></span><span
lang=EN style='color:#363534'> x </span><span class=operator><span lang=EN>=</span></span><span
lang=EN style='color:#363534'> </span><span class=string1><span lang=EN>"Pineapple"</span></span><span
lang=EN style='color:#363534'>;<o:p></o:p></span></pre><pre style='background:
white'><span class=type><span lang=EN style='color:#363534'><a
href="http://qt-project.org/doc/qt-5.0/qtcore/qstring.html">QString</a></span></span><span
lang=EN style='color:#363534'> y </span><span class=operator><span lang=EN>=</span></span><span
lang=EN style='color:#363534'> x</span><span class=operator><span lang=EN>.</span></span><span
lang=EN style='color:#363534'>right(</span><span class=number><span lang=EN>5</span></span><span
lang=EN style='color:#363534'>);      </span><span
class=comment><span lang=EN>// y == "apple"</span></span><span
lang=EN style='color:#363534'><o:p></o:p></span></pre>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<h3 style='background:white'><span class=type><span lang=EN>------------------------------------------------------------------------------------------------<o:p></o:p></span></span></h3>

<p class=MsoNormal><span lang=EN-US>I make a mistake for that today.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>because there was the same for result
string “apple”,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>either from left to right counting 5, or
from right to left counting 5.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Only watched the example, but not read the illustration
above.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I deem the 5 is the index for the string.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>the example for doc should be better?:<o:p></o:p></span></p>

<pre style='background:white'><span class=type><span lang=EN style='color:#363534'><a
href="http://qt-project.org/doc/qt-5.0/qtcore/qstring.html">QString</a></span></span><span
lang=EN style='color:#363534'> x </span><span class=operator><span lang=EN>=</span></span><span
lang=EN style='color:#363534'> </span><span class=string1><span lang=EN>"ThereHaveOneApple"</span></span><span
lang=EN style='color:#363534'>;<o:p></o:p></span></pre><pre style='background:
white'><span class=type><span lang=EN style='color:#363534'><a
href="http://qt-project.org/doc/qt-5.0/qtcore/qstring.html">QString</a></span></span><span
lang=EN style='color:#363534'> y </span><span class=operator><span lang=EN>=</span></span><span
lang=EN style='color:#363534'> x</span><span class=operator><span lang=EN>.</span></span><span
lang=EN style='color:#363534'>right(</span><span class=number><span lang=EN>5</span></span><span
lang=EN style='color:#363534'>);      </span><span
class=comment><span lang=EN>// y == "Apple"</span></span><span
lang=EN style='color:#363534'><o:p></o:p></span></pre>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

</div>

</body>

</html>