<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # QStringRef Class Reference ## [[QtCore](index.htm) module] 該QStringRef類提供了簡單包裝的[QString](qstring.html)子。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, QString?aString, int?aPosition, int?aSize)` * `__init__ (self, QString?aString)` * `__init__ (self, QStringRef?other)` * `QStringRef appendTo (self, QString?string)` * `QChar at (self, int?i)` * `clear (self)` * `int compare (self, QString?other, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int compare (self, QStringRef?other, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int compare (self, QLatin1String?other, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `QChar constData (self)` * `bool contains (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `bool contains (self, QLatin1String?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `bool contains (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int count (self)` * `int count (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int count (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `QChar data (self)` * `bool endsWith (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `bool endsWith (self, QLatin1String?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `bool endsWith (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int indexOf (self, QString?str, int?from?=?0, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int indexOf (self, QLatin1String?str, int?from?=?0, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int indexOf (self, QStringRef?str, int?from?=?0, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `bool isEmpty (self)` * `bool isNull (self)` * `int lastIndexOf (self, QString?str, int?from?=?-1, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int lastIndexOf (self, QLatin1String?str, int?from?=?-1, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int lastIndexOf (self, QStringRef?str, int?from?=?-1, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int length (self)` * `int localeAwareCompare (self, QString?s)` * `int localeAwareCompare (self, QStringRef?s)` * `int position (self)` * `int size (self)` * `bool startsWith (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `bool startsWith (self, QLatin1String?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `bool startsWith (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `QString string (self)` * `QByteArray toAscii (self)` * `QByteArray toLatin1 (self)` * `QByteArray toLocal8Bit (self)` * `QString toString (self)` * `list-of-int toUcs4 (self)` * `QByteArray toUtf8 (self)` * `QChar unicode (self)` ### Static Methods * `int compare (QStringRef?s1, QString?s2, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int compare (QStringRef?s1, QStringRef?s2, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int compare (QStringRef?s1, QLatin1String?s2, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive)` * `int localeAwareCompare (QStringRef?s1, QString?s2)` * `int localeAwareCompare (QStringRef?s1, QStringRef?s2)` ### Special Methods * `bool __eq__ (self, QStringRef?s2)` * `bool __eq__ (self, QString?s2)` * `bool __eq__ (self, QLatin1String?s2)` * `bool __ge__ (self, QStringRef?s2)` * `bool __gt__ (self, QStringRef?s2)` * `bool __le__ (self, QStringRef?s2)` * `__len__ (self)` * `bool __lt__ (self, QStringRef?s2)` * `bool __ne__ (self, QStringRef?s2)` * `bool __ne__ (self, QString?s2)` * `bool __ne__ (self, QLatin1String?s2)` * `str __str__ (self)` * `unicode __unicode__ (self)` * * * ## Detailed Description 該QStringRef類提供了簡單包裝的[QString](qstring.html)子。 QStringRef提供的一個只讀子集[QString](qstring.html)API。 一個字符串引用明確引用的一部分[string](qstringref.html#string)()與給定的[size](qstringref.html#size)() ,起始于一個特定的[position](qstringref.html#position)( ) 。調用[toString](qstringref.html#toString)()返回的數據的一個副本作為一個真正的[QString](qstring.html)實例。 本課程的目的是操縱現有獲得字符串時,提高子處理性能[QString](qstring.html)實例。 QStringRef避免了一個標準的內存分配和引用計數的開銷[QString](qstring.html)通過簡單地引用原字符串的一部分。這可以證明是有利的,低級別的代碼,例如,在一個解析器使用,在潛在的更復雜的代碼的費用。 對于大多數用戶來說,也有使用QStringRef ,而不是沒有任何語義的好處[QString](qstring.html)因為QStringRef需要注意支付給內存管理問題,可能使代碼更復雜的編寫和維護。 **Warning:**一個QStringRef是唯一有效的,只要所引用的字符串存在。如果原始字符串將被刪除,該字符串引用指向無效的內存位置。 我們建議您僅在穩定的代碼,其中分析已經清楚地確定了性能的提升可以通過這個類提供了優化的子字符串處理來替代標準的字符串操作進行使用這個類。 * * * ## Method Documentation ``` QStringRef.__init__ (self) ``` 構造一個空字符串引用。 ``` QStringRef.__init__ (self, QString?aString, int?aPosition, int?aSize) ``` 構造一個字符串引用的字符范圍在給定的_string_由起始指定_position_和_length_在字符。 **Warning:**此功能的存在是為了提高性能,盡可能地,并且不執行邊界檢查。對于程序的正確性,_position_和_length_必須描述一個有效的子串_string_。 這意味著它們的起始_position_必須為正或0和小于_string_的長度,_length_必須是正數或0 ,但比字符串的長度減去較小的起點_position_,即, 0 \u003c =位置\u003c字符串\u003e[length](qstringref.html#length)( )且0 \u003c =長度\u003c =字符串\u003e[length](qstringref.html#length)( ) - 位置必須同時滿足。 ``` QStringRef.__init__ (self, QString?aString) ``` 構造一個字符串引用給定的_string_。 ``` QStringRef.__init__ (self, QStringRef?other) ``` 構造的一個副本_other_字符串引用。 ``` QStringRef QStringRef.appendTo (self, QString?string) ``` 追加字符串引用_string_,并返回一個新的參考組合的字符串數據。 ``` QChar QStringRef.at (self, int?i) ``` 返回字符的給定索引處_position_在字符串引用。 該_position_必須是在字符串中的有效索引位置(即0 \u003c =_position_\u003c[size](qstringref.html#size)())。 ``` QStringRef.clear (self) ``` 通過使空和空清除的字符串引用的內容。 **See also** [isEmpty](qstringref.html#isEmpty)()和[isNull](qstringref.html#isNull)( ) 。 ``` int QStringRef.compare (self, QString?other, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 比較字符串_s1_與串_s2_并返回一個整數大于零小于,等于,或大于,如果_s1_小于,等于或大于_s2_。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum),比較是區分大小寫的,否則比較不區分大小寫。 此功能被引入Qt的4.5 。 ``` int QStringRef.compare (self, QStringRef?other, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這是一個重載函數。 比較字符串_s1_與串_s2_并返回一個整數大于零小于,等于,或大于,如果_s1_小于,等于或大于_s2_。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum),比較是區分大小寫的,否則比較不區分大小寫。 此功能被引入Qt的4.5 。 ``` int QStringRef.compare (self, QLatin1String?other, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這是一個重載函數。 比較字符串_s1_與串_s2_并返回一個整數大于零小于,等于,或大于,如果_s1_小于,等于或大于_s2_。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum),比較是區分大小寫的,否則比較不區分大小寫。 此功能被引入Qt的4.5 。 ``` int QStringRef.compare (QStringRef?s1, QString?s2, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這是一個重載函數。 比較此字符串與_other_字符串并返回比,等于大于零的整數更少,或更大,如果該字符串比小于,等于,或大于_other_字符串。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum),比較是區分大小寫的,否則比較不區分大小寫。 相當于`compare(*this, other, cs)`。 此功能被引入Qt的4.5 。 **See also** [QString.compare](qstring.html#compare)( ) 。 ``` int QStringRef.compare (QStringRef?s1, QStringRef?s2, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這是一個重載函數。 比較此字符串與_other_字符串并返回比,等于大于零的整數更少,或更大,如果該字符串比小于,等于,或大于_other_字符串。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum),比較是區分大小寫的,否則比較不區分大小寫。 相當于`compare(*this, other, cs)`。 此功能被引入Qt的4.5 。 **See also** [QString.compare](qstring.html#compare)( ) 。 ``` int QStringRef.compare (QStringRef?s1, QLatin1String?s2, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這是一個重載函數。 比較此字符串與_other_字符串并返回比,等于大于零的整數更少,或更大,如果該字符串比小于,等于,或大于_other_字符串。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum),比較是區分大小寫的,否則比較不區分大小寫。 相當于`compare(*this, other, cs)`。 此功能被引入Qt的4.5 。 **See also** [QString.compare](qstring.html#compare)( ) 。 ``` QChar QStringRef.constData (self) ``` 同[unicode](qstringref.html#unicode)( ) 。 ``` bool QStringRef.contains (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 如果這個字符串引用包含字符串的出現,則返回True_str_否則返回False 。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [indexOf](qstringref.html#indexOf)()和[count](qstringref.html#count)( ) 。 ``` bool QStringRef.contains (self, QLatin1String?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[contains](qstringref.html#contains)( ) 。 如果這個字符串包含的字符的出現,則返回True_ch_否則返回False 。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 ``` bool QStringRef.contains (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[contains](qstringref.html#contains)( ) 。 如果此字符串包含引用的字符串引用的出現,則返回True_str_否則返回False 。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [indexOf](qstringref.html#indexOf)()和[count](qstringref.html#count)( ) 。 ``` int QStringRef.count (self) ``` 返回由字符串引用所指的字符數。相當于[size](qstringref.html#size)()和[length](qstringref.html#length)( ) 。 **See also** [position](qstringref.html#position)()和[string](qstringref.html#string)( ) 。 ``` int QStringRef.count (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 返回(可能重疊)字符串的出現次數_str_在此字符串中引用。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [QString.count](qstring.html#count)( )[contains](qstringref.html#contains)()和[indexOf](qstringref.html#indexOf)( ) 。 ``` int QStringRef.count (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[count](qstringref.html#count)( ) 。 返回出現的字符數量_ch_在字符串引用。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [QString.count](qstring.html#count)( )[contains](qstringref.html#contains)()和[indexOf](qstringref.html#indexOf)( ) 。 ``` QChar QStringRef.data (self) ``` 同[unicode](qstringref.html#unicode)( ) 。 ``` bool QStringRef.endsWith (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 如果字符串參考結尾,則返回True_str_否則返回False 。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [QString.endsWith](qstring.html#endsWith)()和[startsWith](qstringref.html#startsWith)( ) 。 ``` bool QStringRef.endsWith (self, QLatin1String?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[endsWith](qstringref.html#endsWith)( ) 。 如果字符串參考結尾,則返回True_ch_否則返回False 。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [QString.endsWith](qstring.html#endsWith)()和[endsWith](qstringref.html#endsWith)( ) 。 ``` bool QStringRef.endsWith (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[endsWith](qstringref.html#endsWith)( ) 。 此功能被引入Qt的4.8 。 **See also** [QString.endsWith](qstring.html#endsWith)()和[endsWith](qstringref.html#endsWith)( ) 。 ``` int QStringRef.indexOf (self, QString?str, int?from?=?0, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 返回字符串中第一次出現的索引位置_str_在這個字符串引用,向前搜索的索引位置_from_。返回-1,如果_str_是沒有找到。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 If _from_為-1,搜索從最后一個字符,如果是-2 ,在倒數第二個字符等等。 此功能被引入Qt的4.8 。 **See also** [QString.indexOf](qstring.html#indexOf)( )[lastIndexOf](qstringref.html#lastIndexOf)( )[contains](qstringref.html#contains)()和[count](qstringref.html#count)( ) 。 ``` int QStringRef.indexOf (self, QLatin1String?str, int?from?=?0, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 返回字符串中第一次出現的索引位置_str_在這個字符串引用,向前搜索的索引位置_from_。返回-1,如果_str_是沒有找到。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 If _from_為-1,搜索從最后一個字符,如果是-2 ,在倒數第二個字符等等。 此功能被引入Qt的4.8 。 **See also** [QString.indexOf](qstring.html#indexOf)( )[lastIndexOf](qstringref.html#lastIndexOf)( )[contains](qstringref.html#contains)()和[count](qstringref.html#count)( ) 。 ``` int QStringRef.indexOf (self, QStringRef?str, int?from?=?0, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[indexOf](qstringref.html#indexOf)( ) 。 返回字符的第一個匹配項的索引位置_ch_在字符串參考,向前搜索的索引位置_from_。返回-1,如果_ch_找不到。 此功能被引入Qt的4.8 。 **See also** [QString.indexOf](qstring.html#indexOf)( )[lastIndexOf](qstringref.html#lastIndexOf)( )[contains](qstringref.html#contains)()和[count](qstringref.html#count)( ) 。 ``` bool QStringRef.isEmpty (self) ``` 返回True如果字符串引用沒有字符,否則返回False 。 一個字符串引用是空的,如果它的大小是零。 **See also** [size](qstringref.html#size)( ) 。 ``` bool QStringRef.isNull (self) ``` 返回True如果[string](qstringref.html#string)( )返回一個空指針或指向一個空字符串,否則返回True。 **See also** [size](qstringref.html#size)( ) 。 ``` int QStringRef.lastIndexOf (self, QString?str, int?from?=?-1, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 返回字符串中最后一次出現的索引位置_str_在這個字符串引用,從索引位置向后搜索_from_。如果_from_為-1 (默認),搜索從最后一個字符,如果_from_為-2 ,在倒數第二個字符等等。返回-1,如果_str_是沒有找到。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [QString.lastIndexOf](qstring.html#lastIndexOf)( )[indexOf](qstringref.html#indexOf)( )[contains](qstringref.html#contains)()和[count](qstringref.html#count)( ) 。 ``` int QStringRef.lastIndexOf (self, QLatin1String?str, int?from?=?-1, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[lastIndexOf](qstringref.html#lastIndexOf)( ) 。 返回字符的最后一個匹配項的索引位置_ch_從位置向后搜索_from_。 此功能被引入Qt的4.8 。 **See also** [QString.lastIndexOf](qstring.html#lastIndexOf)( )[indexOf](qstringref.html#indexOf)( )[contains](qstringref.html#contains)()和[count](qstringref.html#count)( ) 。 ``` int QStringRef.lastIndexOf (self, QStringRef?str, int?from?=?-1, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[lastIndexOf](qstringref.html#lastIndexOf)( ) 。 返回字符串中最后一次出現的索引位置_str_在這個字符串引用,從索引位置向后搜索_from_。如果_from_為-1 (默認),搜索從最后一個字符,如果_from_為-2 ,在倒數第二個字符等等。返回-1,如果_str_是沒有找到。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [QString.lastIndexOf](qstring.html#lastIndexOf)( )[indexOf](qstringref.html#indexOf)( )[contains](qstringref.html#contains)()和[count](qstringref.html#count)( ) 。 ``` int QStringRef.length (self) ``` 返回由字符串引用所指的字符數。相當于[size](qstringref.html#size)()和[count](qstringref.html#count)( ) 。 **See also** [position](qstringref.html#position)()和[string](qstringref.html#string)( ) 。 ``` int QStringRef.localeAwareCompare (self, QString?s) ``` 比較_s1_同_s2_并返回一個整數大于零小于,等于,或大于,如果_s1_小于,等于或大于_s2_。 比較是在一個語言環境,也依賴于平臺的方式進行。使用此功能可呈現字符串排序的列表給用戶。 在Mac OS X ,此功能根據“訂單的排序列表”,在國際prefereces面板設置進行比較。 此功能被引入Qt的4.5 。 **See also** [compare](qstringref.html#compare)()和[QTextCodec.locale](index.htm#locale)( ) 。 ``` int QStringRef.localeAwareCompare (self, QStringRef?s) ``` 這是一個重載函數。 比較_s1_同_s2_并返回一個整數大于零小于,等于,或大于,如果_s1_小于,等于或大于_s2_。 比較是在一個語言環境,也依賴于平臺的方式進行。使用此功能可呈現字符串排序的列表給用戶。 此功能被引入Qt的4.5 。 ``` int QStringRef.localeAwareCompare (QStringRef?s1, QString?s2) ``` 這是一個重載函數。 比較此字符串與_other_字符串并返回比,等于大于零的整數更少,或更大,如果該字符串比小于,等于,或大于_other_字符串。 比較是在一個語言環境,也依賴于平臺的方式進行。使用此功能可呈現字符串排序的列表給用戶。 此功能被引入Qt的4.5 。 ``` int QStringRef.localeAwareCompare (QStringRef?s1, QStringRef?s2) ``` 這是一個重載函數。 比較此字符串與_other_字符串并返回比,等于大于零的整數更少,或更大,如果該字符串比小于,等于,或大于_other_字符串。 比較是在一個語言環境,也依賴于平臺的方式進行。使用此功能可呈現字符串排序的列表給用戶。 此功能被引入Qt的4.5 。 ``` int QStringRef.position (self) ``` 返回由字符串引用所引用的參考的字符串的開始位置。 **See also** [size](qstringref.html#size)()和[string](qstringref.html#string)( ) 。 ``` int QStringRef.size (self) ``` 返回由字符串引用所指的字符數。相當于[length](qstringref.html#length)()和[count](qstringref.html#count)( ) 。 **See also** [position](qstringref.html#position)()和[string](qstringref.html#string)( ) 。 ``` bool QStringRef.startsWith (self, QString?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 如果字符串引用開頭,則返回True_str_否則返回False 。 If _cs_ is [Qt.CaseSensitive](qt.html#CaseSensitivity-enum)(默認) ,搜索是區分大小寫的,否則搜索不區分大小寫。 此功能被引入Qt的4.8 。 **See also** [QString.startsWith](qstring.html#startsWith)()和[endsWith](qstringref.html#endsWith)( ) 。 ``` bool QStringRef.startsWith (self, QLatin1String?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[startsWith](qstringref.html#startsWith)( ) 。 此功能被引入Qt的4.8 。 **See also** [QString.startsWith](qstring.html#startsWith)()和[endsWith](qstringref.html#endsWith)( ) 。 ``` bool QStringRef.startsWith (self, QStringRef?str, Qt.CaseSensitivity?cs?=?Qt.CaseSensitive) ``` 這個函數的重載[startsWith](qstringref.html#startsWith)( ) 。 此功能被引入Qt的4.8 。 **See also** [QString.startsWith](qstring.html#startsWith)()和[endsWith](qstringref.html#endsWith)( ) 。 ``` QString QStringRef.string (self) ``` 返回一個指向由字符串引用,或0稱為如果它不引用的字符串的字符串。 **See also** [unicode](qstringref.html#unicode)( ) 。 ``` QByteArray QStringRef.toAscii (self) ``` [](qbytearray.html) [返回字符串的8位表示為](qbytearray.html)[QByteArray](qbytearray.html)。 如果一個編解碼器已使用設置[QTextCodec.setCodecForCStrings](qtextcodec.html#setCodecForCStrings)( ) ,它是用來為Unicode轉換為8位字符,否則這個函數一樣[toLatin1](qstringref.html#toLatin1)( ) 。 需要注意的是,盡管這個名字,這個功能并不一定返回一個US-ASCII ( ANSI X3.4 - 1986)的字符串,其結果可能不是US-ASCII兼容。 此功能被引入Qt的4.8 。 **See also** [toLatin1](qstringref.html#toLatin1)( )[toUtf8](qstringref.html#toUtf8)( )[toLocal8Bit](qstringref.html#toLocal8Bit)()和[QTextCodec](qtextcodec.html)。 ``` QByteArray QStringRef.toLatin1 (self) ``` [](qbytearray.html) [返回字符串的的Latin-1表示為](qbytearray.html)[QByteArray](qbytearray.html)。 返回的字節數組是不確定的,如果字符串包含非拉丁文字符。這些字符可以被抑制或問號代替。 此功能被引入Qt的4.8 。 **See also** [toAscii](qstringref.html#toAscii)( )[toUtf8](qstringref.html#toUtf8)( )[toLocal8Bit](qstringref.html#toLocal8Bit)()和[QTextCodec](qtextcodec.html)。 ``` QByteArray QStringRef.toLocal8Bit (self) ``` [](qbytearray.html) [返回字符串作為當地8位表示](qbytearray.html)[QByteArray](qbytearray.html)。返回的字節數組是不確定的,如果該字符串包含不支持的本地8位編碼的字符。 [QTextCodec.codecForLocale](qtextcodec.html#codecForLocale)( )是用來從Unicode執行轉換。如果本地編碼不能確定,這個函數一樣[toLatin1](qstringref.html#toLatin1)( ) 。 如果這個字符串包含不能在語言環境進行編碼的任何字符,返回的字節數組是不確定的。這些字符可以由另一被抑制或更換。 此功能被引入Qt的4.8 。 **See also** [toAscii](qstringref.html#toAscii)( )[toLatin1](qstringref.html#toLatin1)( )[toUtf8](qstringref.html#toUtf8)()和[QTextCodec](qtextcodec.html)。 ``` QString QStringRef.toString (self) ``` 返回的字符串引用的副本作為[QString](qstring.html)對象。 如果字符串引用不是字符串的一個完整的參考(即[position](qstringref.html#position)()為0,并且[size](qstringref.html#size)( )等于[string](qstringref.html#string)() - \u003e[size](qstringref.html#size)( ) ) ,這個函數會分配一個新的字符串返回。 **See also** [string](qstringref.html#string)( ) 。 ``` list-of-int QStringRef.toUcs4 (self) ``` 返回字符串的UCS-4/UTF-32表示為[QVector](index.htm)\u003cuint\u003e 。 UCS-4是一個統一碼的編解碼器,并且是無損的。所有從這個字符串中的字符可以被編碼在UCS- 4 。 此功能被引入Qt的4.8 。 **See also** [toAscii](qstringref.html#toAscii)( )[toLatin1](qstringref.html#toLatin1)( )[toLocal8Bit](qstringref.html#toLocal8Bit)()和[QTextCodec](qtextcodec.html)。 ``` QByteArray QStringRef.toUtf8 (self) ``` [](qbytearray.html) [返回字符串的UTF-8表示為](qbytearray.html)[QByteArray](qbytearray.html)。 UTF - 8是Unicode編碼,可以表示所有字符的Unicode字符串像[QString](qstring.html)。 然而,在Unicode的范圍內,但是也有一些不被視為某些字符碼點。 Unicode標準中保留每個Unicode平面( U + FFFE , U + FFFF , U +1 FFFE , U +1 FFFF , U +2 FFFE等) ,以及16碼點在范圍U + FDD0最后兩個碼點.. U + FDDF ,包容性的,非字符。如果任何這些出現在字符串中,它們可以被丟棄,而不會出現在UTF-8表示,或者它們可以由一個或多個字符替換被替換。 此功能被引入Qt的4.8 。 **See also** [toAscii](qstringref.html#toAscii)( )[toLatin1](qstringref.html#toLatin1)( )[toLocal8Bit](qstringref.html#toLocal8Bit)()和[QTextCodec](qtextcodec.html)。 ``` QChar QStringRef.unicode (self) ``` 返回的字符串引用一個Unicode表示。由于數據直接源于所引用的字符串,它是不是空終止,除非引用字符串包含字符串的空終止符。 **See also** [string](qstringref.html#string)( ) 。 ``` bool QStringRef.__eq__ (self, QStringRef?s2) ``` ``` bool QStringRef.__eq__ (self, QString?s2) ``` ``` bool QStringRef.__eq__ (self, QLatin1String?s2) ``` ``` bool QStringRef.__ge__ (self, QStringRef?s2) ``` ``` bool QStringRef.__gt__ (self, QStringRef?s2) ``` ``` bool QStringRef.__le__ (self, QStringRef?s2) ``` ``` QStringRef.__len__ (self) ``` ``` bool QStringRef.__lt__ (self, QStringRef?s2) ``` ``` bool QStringRef.__ne__ (self, QStringRef?s2) ``` ``` bool QStringRef.__ne__ (self, QString?s2) ``` ``` bool QStringRef.__ne__ (self, QLatin1String?s2) ``` ``` str QStringRef.__str__ (self) ``` ``` unicode QStringRef.__unicode__ (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>

                              哎呀哎呀视频在线观看