Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QStringRef class provides a thin wrapper around QString substrings. More...
Public Member Functions | |
override bool | Equals (object o) |
override int | GetHashCode () |
QStringRef () | |
| |
QStringRef (QStringRef other) | |
| |
QStringRef (System.Text.StringBuilder @string) | |
| |
QStringRef (System.Text.StringBuilder @string, int position, int size) | |
| |
virtual void | CreateProxy () |
new QStringRef | AppendTo (System.Text.StringBuilder @string) |
| |
new QChar | At (int i) |
| |
new void | Clear () |
| |
new int | Compare (QStringRef s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | Compare (QLatin1String s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | Compare (string s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new QChar | ConstData () |
| |
new QBool | Contains (QChar ch, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new QBool | Contains (QLatin1String str, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new QBool | Contains (QStringRef str, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new QBool | Contains (string str, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | Count () |
| |
new int | Count (QChar c, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | Count (QStringRef s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | Count (string s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new QChar | Data () |
| |
new bool | EndsWith (QLatin1String s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new bool | EndsWith (QChar c, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new bool | EndsWith (QStringRef c, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new bool | EndsWith (string s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | IndexOf (QChar ch, int from=0, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | IndexOf (QLatin1String str, int from=0, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | IndexOf (QStringRef str, int from=0, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | IndexOf (string str, int from=0, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new bool | IsEmpty () |
| |
new bool | IsNull () |
| |
new int | LastIndexOf (QChar ch, int from=-1, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | LastIndexOf (QLatin1String str, int from=-1, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | LastIndexOf (QStringRef str, int from=-1, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | LastIndexOf (string str, int from=-1, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new int | Length () |
| |
new int | LocaleAwareCompare (QStringRef s) |
| |
new int | LocaleAwareCompare (string s) |
| |
new int | Position () |
| |
new int | Size () |
| |
new bool | StartsWith (QLatin1String s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new bool | StartsWith (QChar c, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new bool | StartsWith (QStringRef c, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new bool | StartsWith (string s, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
new System.Text.StringBuilder | String () |
| |
new QByteArray | ToAscii () |
| |
new QByteArray | ToLatin1 () |
| |
new QByteArray | ToLocal8Bit () |
| |
override string | ToString () |
| |
new System.Collections.Generic.List < System.UInt32 > | ToUcs4 () |
| |
new QByteArray | ToUtf8 () |
| |
new QChar | Unicode () |
| |
new void | Dispose () |
Static Public Member Functions | |
static bool | operator!= (QStringRef arg1, QStringRef arg2) |
static bool | operator!= (QStringRef arg1, QLatin1String arg2) |
static bool | operator!= (QStringRef arg1, string arg2) |
static bool | operator< (QStringRef arg1, QStringRef arg2) |
static bool | operator<= (QStringRef arg1, QStringRef arg2) |
static bool | operator== (QStringRef arg1, QStringRef arg2) |
static bool | operator== (QStringRef arg1, QLatin1String arg2) |
static bool | operator== (QStringRef arg1, string arg2) |
static bool | operator> (QStringRef arg1, QStringRef arg2) |
static bool | operator>= (QStringRef arg1, QStringRef arg2) |
static int | Compare (QStringRef s1, QStringRef s2, Qt.CaseSensitivity arg3=Qt.CaseSensitivity.CaseSensitive) |
| |
static int | Compare (QStringRef s1, QLatin1String s2, Qt.CaseSensitivity cs=Qt.CaseSensitivity.CaseSensitive) |
| |
static int | Compare (QStringRef s1, string s2, Qt.CaseSensitivity arg3=Qt.CaseSensitivity.CaseSensitive) |
| |
static int | LocaleAwareCompare (QStringRef s1, QStringRef s2) |
| |
static int | LocaleAwareCompare (QStringRef s1, string s2) |
| |
Protected Member Functions | |
QStringRef (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
virtual System.IntPtr | SmokeObject [get, set] |
The QStringRef class provides a thin wrapper around QString substrings.
QStringRef provides a read-only subset of the QString API.
A string reference explicitly references a portion of a string() with a given size(), starting at a specific position(). Calling toString() returns a copy of the data as a real QString instance.
This class is designed to improve the performance of substring handling when manipulating substrings obtained from existing QString instances. QStringRef avoids the memory allocation and reference counting overhead of a standard QString by simply referencing a part of the original string. This can prove to be advantageous in low level code, such as that used in a parser, at the expense of potentially more complex code.
For most users, there are no semantic benefits to using QStringRef instead of QString since QStringRef requires attention to be paid to memory management issues, potentially making code more complex to write and maintain.
Warning: A QStringRef is only valid as long as the referenced string exists. If the original string is deleted, the string reference points to an invalid memory location.
We suggest that you only use this class in stable code where profiling has clearly identified that performance improvements can be made by replacing standard string operations with the optimized substring handling provided by this class.
See also Implicitly Shared Classes.
|
protected |
QtCore.QStringRef.QStringRef | ( | ) |
Constructs an empty string reference.
QtCore.QStringRef.QStringRef | ( | QStringRef | other | ) |
Constructs a copy of the other string reference.
QtCore.QStringRef.QStringRef | ( | System.Text.StringBuilder @ | string | ) |
Constructs a string reference to the given string.
QtCore.QStringRef.QStringRef | ( | System.Text.StringBuilder @ | string, |
int | position, | ||
int | size | ||
) |
Constructs a string reference to the range of characters in the given string specified by the starting position and length in characters.
Warning: This function exists to improve performance as much as possible, and performs no bounds checking. For program correctness, position and length must describe a valid substring of string.
This means that the starting position must be positive or 0 and smaller than string's length, and length must be positive or 0 but smaller than the string's length minus the starting position; i.e, 0 <= position < string->length() and 0 <= length <= string->length() - position must both be satisfied.
new QStringRef QtCore.QStringRef.AppendTo | ( | System.Text.StringBuilder @ | string | ) |
Appends the string reference to string, and returns a new reference to the combined string data.
new QChar QtCore.QStringRef.At | ( | int | i | ) |
Returns the character at the given index position in the string reference.
The position must be a valid index position in the string (i.e., 0 <= position < size()).
new void QtCore.QStringRef.Clear | ( | ) |
Clears the contents of the string reference by making it null and empty.
See also isEmpty() and isNull().
|
static |
Compares the string s1 with the string s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
If cs is Qt::CaseSensitive, the comparison is case sensitive; otherwise the comparison is case insensitive.
This function was introduced in Qt 4.5.
|
static |
Compares the string s1 with the string s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
If cs is Qt::CaseSensitive, the comparison is case sensitive; otherwise the comparison is case insensitive.
This function was introduced in Qt 4.5.
new int QtCore.QStringRef.Compare | ( | QStringRef | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Compares the string s1 with the string s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
If cs is Qt::CaseSensitive, the comparison is case sensitive; otherwise the comparison is case insensitive.
This function was introduced in Qt 4.5.
new int QtCore.QStringRef.Compare | ( | QLatin1String | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Compares the string s1 with the string s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
If cs is Qt::CaseSensitive, the comparison is case sensitive; otherwise the comparison is case insensitive.
This function was introduced in Qt 4.5.
|
static |
Compares the string s1 with the string s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
If cs is Qt::CaseSensitive, the comparison is case sensitive; otherwise the comparison is case insensitive.
This function was introduced in Qt 4.5.
new int QtCore.QStringRef.Compare | ( | string | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Compares the string s1 with the string s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
If cs is Qt::CaseSensitive, the comparison is case sensitive; otherwise the comparison is case insensitive.
This function was introduced in Qt 4.5.
new QChar QtCore.QStringRef.ConstData | ( | ) |
Same as unicode().
new QBool QtCore.QStringRef.Contains | ( | QChar | ch, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if this string reference contains an occurrence of the string str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also indexOf() and count().
new QBool QtCore.QStringRef.Contains | ( | QLatin1String | str, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if this string reference contains an occurrence of the string str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also indexOf() and count().
new QBool QtCore.QStringRef.Contains | ( | QStringRef | str, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if this string reference contains an occurrence of the string str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also indexOf() and count().
new QBool QtCore.QStringRef.Contains | ( | string | str, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if this string reference contains an occurrence of the string str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also indexOf() and count().
new int QtCore.QStringRef.Count | ( | ) |
Returns the number of characters referred to by the string reference. Equivalent to size() and length().
See also position() and string().
new int QtCore.QStringRef.Count | ( | QChar | c, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the number of characters referred to by the string reference. Equivalent to size() and length().
See also position() and string().
new int QtCore.QStringRef.Count | ( | QStringRef | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the number of characters referred to by the string reference. Equivalent to size() and length().
See also position() and string().
new int QtCore.QStringRef.Count | ( | string | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the number of characters referred to by the string reference. Equivalent to size() and length().
See also position() and string().
|
virtual |
new QChar QtCore.QStringRef.Data | ( | ) |
Same as unicode().
new void QtCore.QStringRef.Dispose | ( | ) |
new bool QtCore.QStringRef.EndsWith | ( | QLatin1String | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference ends with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::endsWith() and startsWith().
new bool QtCore.QStringRef.EndsWith | ( | QChar | c, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference ends with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::endsWith() and startsWith().
new bool QtCore.QStringRef.EndsWith | ( | QStringRef | c, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference ends with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::endsWith() and startsWith().
new bool QtCore.QStringRef.EndsWith | ( | string | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference ends with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::endsWith() and startsWith().
override bool QtCore.QStringRef.Equals | ( | object | o | ) |
override int QtCore.QStringRef.GetHashCode | ( | ) |
new int QtCore.QStringRef.IndexOf | ( | QChar | ch, |
int | from = 0 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the first occurrence of the string str in this string reference, searching forward from index position from. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
If from is -1, the search starts at the last character; if it is -2, at the next to last character and so on.
This function was introduced in Qt 4.8.
See also QString::indexOf(), lastIndexOf(), contains(), and count().
new int QtCore.QStringRef.IndexOf | ( | QLatin1String | str, |
int | from = 0 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the first occurrence of the string str in this string reference, searching forward from index position from. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
If from is -1, the search starts at the last character; if it is -2, at the next to last character and so on.
This function was introduced in Qt 4.8.
See also QString::indexOf(), lastIndexOf(), contains(), and count().
new int QtCore.QStringRef.IndexOf | ( | QStringRef | str, |
int | from = 0 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the first occurrence of the string str in this string reference, searching forward from index position from. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
If from is -1, the search starts at the last character; if it is -2, at the next to last character and so on.
This function was introduced in Qt 4.8.
See also QString::indexOf(), lastIndexOf(), contains(), and count().
new int QtCore.QStringRef.IndexOf | ( | string | str, |
int | from = 0 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the first occurrence of the string str in this string reference, searching forward from index position from. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
If from is -1, the search starts at the last character; if it is -2, at the next to last character and so on.
This function was introduced in Qt 4.8.
See also QString::indexOf(), lastIndexOf(), contains(), and count().
new bool QtCore.QStringRef.IsEmpty | ( | ) |
Returns true if the string reference has no characters; otherwise returns false.
A string reference is empty if its size is zero.
See also size().
new bool QtCore.QStringRef.IsNull | ( | ) |
Returns true if string() returns a null pointer or a pointer to a null string; otherwise returns true.
See also size().
new int QtCore.QStringRef.LastIndexOf | ( | QChar | ch, |
int | from = -1 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the last occurrence of the string str in this string reference, searching backward from index position from. If from is -1 (default), the search starts at the last character; if from is -2, at the next to last character and so on. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::lastIndexOf(), indexOf(), contains(), and count().
new int QtCore.QStringRef.LastIndexOf | ( | QLatin1String | str, |
int | from = -1 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the last occurrence of the string str in this string reference, searching backward from index position from. If from is -1 (default), the search starts at the last character; if from is -2, at the next to last character and so on. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::lastIndexOf(), indexOf(), contains(), and count().
new int QtCore.QStringRef.LastIndexOf | ( | QStringRef | str, |
int | from = -1 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the last occurrence of the string str in this string reference, searching backward from index position from. If from is -1 (default), the search starts at the last character; if from is -2, at the next to last character and so on. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::lastIndexOf(), indexOf(), contains(), and count().
new int QtCore.QStringRef.LastIndexOf | ( | string | str, |
int | from = -1 , |
||
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns the index position of the last occurrence of the string str in this string reference, searching backward from index position from. If from is -1 (default), the search starts at the last character; if from is -2, at the next to last character and so on. Returns -1 if str is not found.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::lastIndexOf(), indexOf(), contains(), and count().
new int QtCore.QStringRef.Length | ( | ) |
Returns the number of characters referred to by the string reference. Equivalent to size() and count().
See also position() and string().
new int QtCore.QStringRef.LocaleAwareCompare | ( | QStringRef | s | ) |
This is an overloaded function.
Compares this string with the other string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the other string.
The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.
This function was introduced in Qt 4.5.
|
static |
This is an overloaded function.
Compares s1 with s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.
This function was introduced in Qt 4.5.
|
static |
Compares s1 with s2 and returns an integer less than, equal to, or greater than zero if s1 is less than, equal to, or greater than s2.
The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.
On Mac OS X, this function compares according the "Order for sorted lists" setting in the International prefereces panel.
This function was introduced in Qt 4.5.
See also compare() and QTextCodec::locale().
new int QtCore.QStringRef.LocaleAwareCompare | ( | string | s | ) |
This is an overloaded function.
Compares this string with the other string and returns an integer less than, equal to, or greater than zero if this string is less than, equal to, or greater than the other string.
The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.
This function was introduced in Qt 4.5.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
new int QtCore.QStringRef.Position | ( | ) |
Returns the starting position in the referenced string that is referred to by the string reference.
See also size() and string().
new int QtCore.QStringRef.Size | ( | ) |
Returns the number of characters referred to by the string reference. Equivalent to length() and count().
See also position() and string().
new bool QtCore.QStringRef.StartsWith | ( | QLatin1String | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference starts with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::startsWith() and endsWith().
new bool QtCore.QStringRef.StartsWith | ( | QChar | c, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference starts with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::startsWith() and endsWith().
new bool QtCore.QStringRef.StartsWith | ( | QStringRef | c, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference starts with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::startsWith() and endsWith().
new bool QtCore.QStringRef.StartsWith | ( | string | s, |
Qt.CaseSensitivity | cs = Qt.CaseSensitivity.CaseSensitive |
||
) |
Returns true if the string reference starts with str; otherwise returns false.
If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.
This function was introduced in Qt 4.8.
See also QString::startsWith() and endsWith().
new System.Text.StringBuilder QtCore.QStringRef.String | ( | ) |
Returns a pointer to the string referred to by the string reference, or 0 if it does not reference a string.
See also unicode().
new QByteArray QtCore.QStringRef.ToAscii | ( | ) |
Returns an 8-bit representation of the string as a QByteArray.
If a codec has been set using QTextCodec::setCodecForCStrings(), it is used to convert Unicode to 8-bit char; otherwise this function does the same as toLatin1().
Note that, despite the name, this function does not necessarily return an US-ASCII (ANSI X3.4-1986) string and its result may not be US-ASCII compatible.
This function was introduced in Qt 4.8.
See also toLatin1(), toUtf8(), toLocal8Bit(), and QTextCodec.
new QByteArray QtCore.QStringRef.ToLatin1 | ( | ) |
Returns a Latin-1 representation of the string as a QByteArray.
The returned byte array is undefined if the string contains non-Latin1 characters. Those characters may be suppressed or replaced with a question mark.
This function was introduced in Qt 4.8.
See also toAscii(), toUtf8(), toLocal8Bit(), and QTextCodec.
new QByteArray QtCore.QStringRef.ToLocal8Bit | ( | ) |
Returns the local 8-bit representation of the string as a QByteArray. The returned byte array is undefined if the string contains characters not supported by the local 8-bit encoding.
QTextCodec::codecForLocale() is used to perform the conversion from Unicode. If the locale encoding could not be determined, this function does the same as toLatin1().
If this string contains any characters that cannot be encoded in the locale, the returned byte array is undefined. Those characters may be suppressed or replaced by another.
This function was introduced in Qt 4.8.
See also toAscii(), toLatin1(), toUtf8(), and QTextCodec.
override string QtCore.QStringRef.ToString | ( | ) |
Returns a copy of the string reference as a QString object.
If the string reference is not a complete reference of the string (meaning that position() is 0 and size() equals string()->size()), this function will allocate a new string to return.
See also string().
new System.Collections.Generic.List<System.UInt32> QtCore.QStringRef.ToUcs4 | ( | ) |
Returns a UCS-4/UTF-32 representation of the string as a QVector<uint>.
UCS-4 is a Unicode codec and is lossless. All characters from this string can be encoded in UCS-4.
This function was introduced in Qt 4.8.
See also toAscii(), toLatin1(), toLocal8Bit(), and QTextCodec.
new QByteArray QtCore.QStringRef.ToUtf8 | ( | ) |
Returns a UTF-8 representation of the string as a QByteArray.
UTF-8 is a Unicode codec and can represent all characters in a Unicode string like QString.
However, in the Unicode range, there are certain codepoints that are not considered characters. The Unicode standard reserves the last two codepoints in each Unicode Plane (U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, etc.), as well as 16 codepoints in the range U+FDD0..U+FDDF, inclusive, as non-characters. If any of those appear in the string, they may be discarded and will not appear in the UTF-8 representation, or they may be replaced by one or more replacement characters.
This function was introduced in Qt 4.8.
See also toAscii(), toLatin1(), toLocal8Bit(), and QTextCodec.
new QChar QtCore.QStringRef.Unicode | ( | ) |
Returns a Unicode representation of the string reference. Since the data stems directly from the referenced string, it is not null-terminated unless the string reference includes the string's null terminator.
See also string().
|
protected |
|
getset |