<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # QLatin1String Class Reference ## [[QtCore](index.htm) module] 該QLatin1String類提供了簡單包裝的一個US-ASCII/Latin-1編碼的字符串文字。[More...](#details) ### Methods * `__init__ (self, str?s)` * `__init__ (self, QLatin1String)` * `str latin1 (self)` ### Special Methods * `bool __eq__ (self, QString?s)` * `bool __eq__ (self, QLatin1String?s2)` * `bool __eq__ (self, QStringRef?s2)` * `bool __ge__ (self, QString?s)` * `bool __ge__ (self, QLatin1String?s2)` * `bool __gt__ (self, QString?s)` * `bool __gt__ (self, QLatin1String?s2)` * `bool __le__ (self, QString?s)` * `bool __le__ (self, QLatin1String?s2)` * `bool __lt__ (self, QString?s)` * `bool __lt__ (self, QLatin1String?s2)` * `bool __ne__ (self, QString?s)` * `bool __ne__ (self, QLatin1String?s2)` * `bool __ne__ (self, QStringRef?s2)` * `str __repr__ (self)` * * * ## Detailed Description 這個類可以醃制。 該QLatin1String類提供了簡單包裝的一個US-ASCII/Latin-1編碼的字符串文字。 許多[QString](qstring.html)的成員函數重載接受`const char *`而不是[QString](qstring.html)。這包括拷貝構造函數,賦值操作符,比較操作符,以及其他各種功能,如[insert()](qstring.html#insert),[replace()](qstring.html#replace)和[indexOf()](qstring.html#indexOf)。這些功能通常是優化,以避免建設[QString](qstring.html)為對象`const char *`數據。例如,假設`str`是[QString](qstring.html), ``` if (str == "auto" || str == "extern" || str == "static" || str == "register") { ... } ``` 是不是快很多 ``` if (str == [QString](qstring.html)("auto") || str == [QString](qstring.html)("extern") || str == [QString](qstring.html)("static") || str == [QString](qstring.html)("register")) { ... } ``` 因為它沒有構造四個臨時[QString](qstring.html)對象,使字符數據的深層副本。 定義應用程序`QT_NO_CAST_FROM_ASCII`(在所說明[QString](qstring.html)文檔)不具有訪問[QString](qstring.html)的`const char *`API。提供指定固定的Latin-1的字符串的有效方式, Qt提供了QLatin1String ,這是圍繞一個只是一個非常薄的包裝`const char *`。使用QLatin1String ,上面的例子代碼變得 ``` if (str == QLatin1String("auto") || str == QLatin1String("extern") || str == QLatin1String("static") || str == QLatin1String("register") { ... } ``` 這是一個有點長一些,但它提供了完全相同的利益作為代碼的第一個版本,并且比使用轉換Latin-1的字符串更快[QString.fromLatin1](qstring.html#fromLatin1)( ) 。 多虧了[QString](qstring.html)(常量QLatin1String & )構造函數, QLatin1String可以到處使用[QString](qstring.html)預計。例如: ``` [QLabel](qlabel.html) *label = new [QLabel](qlabel.html)(QLatin1String("MOD"), this); ``` * * * ## Method Documentation ``` QLatin1String.__init__ (self, str?s) ``` 構造一個[QLatin1String](qlatin1string.html)對象,它存儲_str_。注意,如果_str_為0時,將創建一個空字符串,這種情況下是通過處理[QString](qstring.html)。 字符串數據是_not_復制。調用者必須能夠保證_str_也不會被刪除或修改,只要該[QLatin1String](qlatin1string.html)對象存在。 **See also** [latin1](qlatin1string.html#latin1)( ) 。 ``` QLatin1String.__init__ (self, QLatin1String) ``` ``` str QLatin1String.latin1 (self) ``` 返回存儲在此對象中的Latin-1的字符串。 ``` bool QLatin1String.__eq__ (self, QString?s) ``` ``` bool QLatin1String.__eq__ (self, QLatin1String?s2) ``` ``` bool QLatin1String.__eq__ (self, QStringRef?s2) ``` ``` bool QLatin1String.__ge__ (self, QString?s) ``` ``` bool QLatin1String.__ge__ (self, QLatin1String?s2) ``` ``` bool QLatin1String.__gt__ (self, QString?s) ``` ``` bool QLatin1String.__gt__ (self, QLatin1String?s2) ``` ``` bool QLatin1String.__le__ (self, QString?s) ``` ``` bool QLatin1String.__le__ (self, QLatin1String?s2) ``` ``` bool QLatin1String.__lt__ (self, QString?s) ``` ``` bool QLatin1String.__lt__ (self, QLatin1String?s2) ``` ``` bool QLatin1String.__ne__ (self, QString?s) ``` ``` bool QLatin1String.__ne__ (self, QLatin1String?s2) ``` ``` bool QLatin1String.__ne__ (self, QStringRef?s2) ``` ``` str QLatin1String.__repr__ (self) ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看