CopperSpice API
1.9.2
|
Provides a UTF-8 string class. More...
Inherits CsString
Classes | |
class | const_iterator |
STL style const iterator for QString8 More... | |
class | iterator |
STL style iterator for QString8 More... | |
Public Typedefs | |
using | const_reverse_iterator = CsString::CsStringReverseIterator< const_iterator > |
using | difference_type = std::ptrdiff_t |
using | reverse_iterator = CsString::CsStringReverseIterator< iterator > |
using | size_type = std::ptrdiff_t |
using | storage_type = char |
using | value_type = QChar32 |
Public Types | |
enum | NormalizationForm |
Public Methods | |
QString8 () | |
template<int N> | |
QString8 (const char (&cStr)[N]) | |
QString8 (const char8_t *str) | |
QString8 (const char8_t *str, size_type size) | |
QString8 (const QByteArray &str) | |
QString8 (const QChar32 *data, size_type numOfChars=-1) | |
QString8 (const QString8 &other) = default | |
QString8 (const_iterator begin, const_iterator end) | |
template<typename Iterator > | |
QString8 (Iterator begin, Iterator end) | |
QString8 (QChar32 c) | |
QString8 (QChar32::SpecialCharacter c) | |
QString8 (QString8 &&other) = default | |
QString8 (QStringView8 str) | |
QString8 (size_type numOfChars, QChar32 c) | |
~QString8 () = default | |
QString8 & | append (char32_t c) |
QString8 & | append (const QChar32 *data, size_type numOfChars) |
QString8 & | append (const QString8 &other) |
QString8 & | append (const_iterator iter_begin, const_iterator iter_end) |
QString8 & | append (QChar32 c) |
QString8 & | append (QStringView8 str) |
QString8 & | append (QStringView8 str, size_type indexStart, size_type numOfChars) |
QChar32 | at (size_type index) const |
QChar32 | back () const |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
void | chop (size_type numOfChars) |
void | clear () |
int | compare (const QString8 &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
int | compare (QStringView8 str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_iterator | constBegin () const |
const char * | constData () const |
const_iterator | constEnd () const |
bool | contains (char ch, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
bool | contains (const QRegularExpression8 ®Exp) const |
bool | contains (const QString8 &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
bool | contains (QChar32 c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
bool | contains (QStringView8 str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
size_type | count () const |
size_type | count (const QRegularExpression8 ®Exp) const |
size_type | count (const QString8 &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
size_type | count (QChar32 c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
size_type | count (QStringView8 str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
const char * | data () const |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
bool | endsWith (const QString8 &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
bool | endsWith (QChar32 c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
bool | endsWith (QStringView8 str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
QString8 & | fill (QChar32 c, size_type numOfChars=-1) |
QChar32 | first () const |
template<typename SP = QStringParser, typename... Ts> | |
QString8 | formatArg (Ts &&...args) const |
template<typename SP = QStringParser, typename... Ts> | |
QString8 | formatArgs (Ts &&...args) const |
QChar32 | front () const |
size_type | indexOf (const QRegularExpression8 ®Exp, size_type from=0) const |
size_type | indexOf (const QString8 &str, size_type from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
size_type | indexOf (QChar32 c, size_type from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_iterator | indexOfFast (const QRegularExpression8 ®Exp) const |
const_iterator | indexOfFast (const QRegularExpression8 ®Exp, const_iterator from) const |
const_iterator | indexOfFast (const QString8 &str) const |
const_iterator | indexOfFast (const QString8 &str, const_iterator from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_iterator | indexOfFast (QChar32 c) const |
const_iterator | indexOfFast (QChar32 c, const_iterator from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_iterator | indexOfFast (QStringView8 str, const_iterator from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
QString8 & | insert (const_iterator first, const QString8 &str) |
template<typename Iterator > | |
QString8 & | insert (const_iterator first, Iterator begin, Iterator end) |
QString8 & | insert (size_type indexStart, const QChar32 *data, size_type numOfChars) |
QString8 & | insert (size_type indexStart, const QString8 &str) |
QString8 & | insert (size_type indexStart, QChar32 c) |
QString8 & | insert (size_type indexStart, QStringView8 str) |
QString8 & | insert (size_type indexStart, QStringView8 str, size_type srcStart, size_type numOfChars) |
bool | isEmpty () const |
QChar32 | last () const |
size_type | lastIndexOf (const QString8 &str, size_type from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
size_type | lastIndexOf (QChar32 c, size_type from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_iterator | lastIndexOfFast (const QString8 &str) const |
const_iterator | lastIndexOfFast (const QString8 &str, const_iterator from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_iterator | lastIndexOfFast (QChar32 c) const |
const_iterator | lastIndexOfFast (QChar32 c, const_iterator from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_iterator | lastIndexOfFast (QStringView8 str, const_iterator from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
QString8 | left (size_type numOfChars) const |
QString8 | leftJustified (size_type width, QChar32 fill=UCHAR (' '), bool truncate=false) const |
QStringView8 | leftView (size_type numOfChars) const |
size_type | length () const |
int | localeAwareCompare (const QString8 &str) const |
int | localeAwareCompare (QStringView8 str) const |
QString8 | mid (const_iterator iter, size_type numOfChars=-1) const |
QString8 | mid (size_type indexStart, size_type numOfChars=-1) const |
QStringView8 | midView (const_iterator iter, size_type numOfChars=-1) const |
QStringView8 | midView (size_type indexStart, size_type numOfChars=-1) const |
QString8 | normalized (QString8::NormalizationForm mode, QChar32::UnicodeVersion version=QChar32::Unicode_Unassigned) const |
QString8 & | operator+= (const QString8 &other) |
QString8 & | operator+= (QChar32 c) |
QString8 & | operator+= (QChar32::SpecialCharacter c) |
QString8 & | operator+= (QStringView8 str) |
QString8 & | operator= (const QString8 &other) = default |
QString8 & | operator= (QChar32 c) |
QString8 & | operator= (QString8 &&other) = default |
QString8 & | operator= (QStringView8 str) |
QChar32 | operator[] (size_type index) const |
QString8 & | prepend (char32_t c) |
QString8 & | prepend (const QChar32 *data, size_type numOfChars) |
QString8 & | prepend (const QString8 &other) |
QString8 & | prepend (const_iterator iter_begin, const_iterator iter_end) |
QString8 & | prepend (QChar32 c) |
void | push_back (const QString8 &other) |
void | push_back (QChar32 c) |
void | push_front (const QString8 &other) |
void | push_front (QChar32 c) |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
QString8 & | remove (const QRegularExpression8 ®Exp) |
QString8 & | remove (const QString8 &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
QString8 & | remove (QChar32 c, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
QString8 & | remove (size_type indexStart, size_type numOfChars) |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
QString8 | repeated (size_type count) const |
QString8 & | replace (const QChar32 *before, size_type beforeSize, const QChar32 *after, size_type afterSize, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
QString8 & | replace (const QRegularExpression8 ®Exp, const QString8 &after) |
QString8 & | replace (const QString8 &before, const QString8 &after, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
QString8 & | replace (const_iterator first, const_iterator last, const QString8 &str) |
template<typename Iterator > | |
QString8 & | replace (const_iterator first1, const_iterator last1, Iterator first2, Iterator last2) |
QString8 & | replace (QChar32 before, QChar32 after, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
QString8 & | replace (QChar32 c, const QString8 &after, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
QString8 & | replace (size_type indexStart, size_type numOfChars, const QChar32 *data, size_type sizeStr) |
QString8 & | replace (size_type indexStart, size_type numOfChars, const QString8 &str) |
QString8 & | replace (size_type indexStart, size_type numOfChars, const QString8 &str, size_type sizeStr) |
QString8 & | replace (size_type indexStart, size_type numOfChars, QChar32 c) |
void | resize (size_type numOfChars) |
void | resize (size_type numOfChars, QChar32 c) |
QString8 | right (size_type count) const |
QString8 | rightJustified (size_type width, QChar32 fill=UCHAR (' '), bool truncate=false) const |
QStringView8 | rightView (size_type count) const |
template<typename SP = QStringParser, typename... Ts> | |
QString8 | section (const QString8 &separator, Ts...args) const |
template<typename SP = QStringParser, typename... Ts> | |
QString8 | section (QChar32 separator, Ts...args) const |
QString8 | simplified () && |
QString8 | simplified () const & |
size_type | size () const |
size_type | size_storage () const |
template<typename SP = QStringParser, typename... Ts> | |
auto | split (const QRegularExpression &separator, Ts...args) const |
template<typename SP = QStringParser, typename... Ts> | |
auto | split (const QString8 &separator, Ts...args) const |
template<typename SP = QStringParser, typename... Ts> | |
auto | split (QChar32 separator, Ts...args) const |
void | squeeze () |
bool | startsWith (const QString8 &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
bool | startsWith (QChar32 c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
bool | startsWith (QStringView8 str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
const_storage_iterator | storage_begin () const |
const_storage_iterator | storage_end () const |
const_storage_reverse_iterator | storage_rbegin () const |
const_storage_reverse_iterator | storage_rend () const |
void | swap (QString8 &other) |
QString8 | toCaseFolded () && |
QString8 | toCaseFolded () const & |
CFStringRef | toCFString () const |
template<typename SP = QStringParser> | |
double | toDouble (bool *ok=nullptr) const |
template<typename SP = QStringParser> | |
float | toFloat (bool *ok=nullptr) const |
QString8 | toHtmlEscaped () const |
template<typename R , typename SP = QStringParser> | |
R | toInteger (bool *ok=nullptr, int base=10) const |
QByteArray | toLatin1 () const |
QString8 | toLower () && |
QString8 | toLower () const & |
NSString * | toNSString () const |
std::string | toStdString () const |
std::wstring | toStdWString () const |
QString8 | toUpper () && |
QString8 | toUpper () const & |
QString16 | toUtf16 () const |
QByteArray | toUtf8 () const |
QString8 | trimmed () && |
QString8 | trimmed () const & |
void | truncate (size_type length) |
const uint8_t * | utf8 () const |
Static Public Methods | |
static int | compare (const QString8 &str1, const QString8 &str2, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
static int | compare (QStringView8 str1, QStringView8 str2, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
static QString8 | fromCFString (CFStringRef string) |
static QString8 | fromLatin1 (const char *str, size_type numOfChars=-1) |
static QString8 | fromLatin1 (const QByteArray &str) |
static QString8 | fromNSString (const NSString *string) |
static QString8 | fromStdString (const std::string &str, size_type numOfChars=-1) |
static QString8 | fromStdWString (const std::wstring &str, size_type numOfChars=-1) |
static QString8 | fromUtf16 (const char16_t *str, size_type numOfChars=-1) |
static QString8 | fromUtf16 (const QString16 &str) |
static QString8 | fromUtf8 (const char *str, size_type numOfChars=-1) |
static QString8 | fromUtf8 (const char8_t *str, size_type numOfChars=-1) |
static QString8 | fromUtf8 (const QByteArray &str) |
static int | localeAwareCompare (const QString8 &str1, const QString8 &str2) |
static int | localeAwareCompare (QStringView8 str1, QStringView8 str2) |
template<typename SP = QStringParser> | |
static QString8 | number (double value, char format= 'g', int precision=6) |
template<typename V , typename SP = QStringParser> | |
static QString8 | number (V value, int base=10) |
Related Functions | |
These are not member functions | |
bool | operator!= (const char (&cString)[N], const QString8 &str) |
bool | operator!= (const QString8 &str, const char (&cString)[N]) |
bool | operator!= (const QString8 &str1, const QString8 &str2) |
QString8 | operator+ (const char (&cString)[N], const QString8 &str) |
QString8 | operator+ (const QString8 &str, const char (&cString)[N]) |
QString8 | operator+ (const QString8 &str, QChar32 c) |
QString8 | operator+ (const QString8 &str1, const QString8 &str2) |
QString8 | operator+ (QChar32 c, const QString8 &str) |
QString8 && | operator+ (QString8 &&str, const char (&cString)[N]) |
QString8 && | operator+ (QString8 &&str, QChar32 c) |
QString8 && | operator+ (QString8 &&str1, const QString8 &str2) |
bool | operator< (const char (&cString)[N], const QString8 &str) |
bool | operator< (const QString8 &str, const char (&cString)[N]) |
bool | operator< (const QString8 &str1, const QString8 &str2) |
QDataStream & | operator<< (QDataStream &stream, const QString8 &str) |
bool | operator<= (const char (&cString)[N], const QString8 &str) |
bool | operator<= (const QString8 &str, const char (&cString)[N]) |
bool | operator<= (const QString8 &str1, const QString8 &str2) |
bool | operator== (const char (&cString)[N], const QString8 &str) |
bool | operator== (const QString8 &str, const char (&cString)[N]) |
bool | operator== (const QString8 &str1, const QString8 &str2) |
bool | operator> (const char (&cString)[N], const QString8 &str) |
bool | operator> (const QString8 &str, const char (&cString)[N]) |
bool | operator> (const QString8 &str1, const QString8 &str2) |
bool | operator>= (const char (&cString)[N], const QString8 &str) |
bool | operator>= (const QString8 &str, const char (&cString)[N]) |
bool | operator>= (const QString8 &str1, const QString8 &str2) |
QDataStream & | operator>> (QDataStream &stream, QString8 &str) |
QString | |
void | swap (QString8 &str1, QString8 &str2) |
QString8 provides a UTF-8 Unicode aware string class which stores a sequence of QChar32 elements. Each QChar32 corresponds to one Unicode code point. Unicode is an international standard which supports the majority of human languages.
CopperSpice also provides QByteArray to store raw bytes and traditional 8-bit null terminated strings. QString8 is the appropriate string class in almost all cases. The QByteArray class is appropriate when storing raw binary data. QString16 should only be used when interfacing with external libraries which expect UTF-16 encoded data.
Using the QString8 class is synonymous with using QString. There is a typedef in CopperSpice which defines QString as equivalent to QString8.
For more information about strings, code points, text encodings, and internationalization refer to Unicode and Internationalization.
One way to initialize a QString8 is to pass a string literal to the constructor. The following code creates a QString8 of size 5 containing the data "Hello".
You can also construct a string using an array of QChar32 as shown below.
A third approach is to set the size of the string using resize() and then initialize the data, character by character. QString8 uses zero based indexes. To access the code point at a particular index position use operator[](). For non-const strings operator[]() returns a reference to a code point which can be used on the left side of an assignment.
A QString8 can contain '\0' characters. The size() method always returns the size of the whole string including the embedded null characters.
String literals can be passed to methods which take a QString8 as an argument. To compare a QString8 with a string literal use code similar to the following.
QString8 provides the following basic methods for modifying strings: append(), prepend(), insert(), replace(), and remove().
The replace() and remove() methods first two arguments are the position from which to start erasing and the number of characters that should be erased. If you want to replace all occurrences of a particular substring with another, use one of the two-parameter replace() overloads.
A frequent requirement is to remove whitespace characters from a string ('\n', '\t', ' ', etc.). If you want to remove whitespace from both ends of a QString8, use the trimmed() method. If you want to remove whitespace from both ends and replace multiple consecutive whitespaces with a single space character within the string, use simplified().
If you want to find all occurrences of a particular character or substring in a QString8, use the indexOf() or lastIndexOf() methods. The former searches forward starting from a given index position, the latter searches backward. Both return the index position of the character or substring if found, otherwise they return -1.
The following is a typical loop which finds all occurrences of a particular substring.
To retrieve an upper or lowercase version of a string use toUpper() or toLower().
Lists of strings are handled by the QStringList class. To obtain a list of strings from a string list that contain a particular substring or which match a particular QRegularExpression, using QStringList::filter().
To check if a QString8 starts or ends with a particular substring use startsWith() or endsWith(). To verify if a QString8 contains a particular character or substring, use the contains() method. To find out how many times a particular character or substring occurs in the string, use count().
A QString8 can be compared using overloaded operators such as operator<(), operator<=(), operator==(), operator>=(), etc. The comparison is based exclusively on the numeric Unicode values of the characters. The result may not be what is expected if the string contains non-ASCII characters. In this case, a better way to compare is to use QString8::localeAwareCompare() method.
To obtain a pointer to the raw data call constData(). This method returns a pointer to the beginning of the null terminated string. The pointer is guaranteed to remain valid until a non-const method is called on this string.
The following methods and typedefs are either unsafe, do not work with all Unicode characters, or are unnecessary when using QString8.
Method | Description |
---|---|
asprintf() | Since C variadic functions are not type safe, use the QTextStream class or QStringParser::formatArgs |
capacity() | Variable length encodings do not support a fixed capacity, refer to resize() |
fromAscii() | Refer to fromLatin1() |
fromLocal8Bit() | Result could be undefined or different based on the platform and therefore removed |
fromWCharArray() | Result could be different based on the platforms definition of wchar and therefore removed |
isNull() | The distinction between empty and null is error prone and therefore removed |
isRightToLeft() | Direction is not a boolean property of a string and therefore removed |
operator[] | In place edit is not supported, use replace() instead |
reserve() | Variable length encodings do not support a fixed capacity, refer to resize() |
setNum() | Replace with QString8::number or QStringParser::number, for an example refer to Migrating setNum |
setUtf16() | Replace with fromUtf16() |
toAscii() | Refer to toLatin1() |
toLocal8Bit() | Result could be undefined or different based on the platform and therefore removed |
toWCharArray() | Result could be different based on the platforms definition of wchar and therefore removed |
unicode() | Replace with constData() |
utf16() | Replace with utf8() |
vasprintf() | Since C variadic functions are not type safe, use the QTextStream class or QStringParser::formatArgs() |
QT_NO_CAST_FROM_ASCII | Replaced with CS_STRING_ALLOW_UNSAFE |
QT_NO_CAST_TO_ASCII | Replaced with CS_STRING_ALLOW_UNSAFE |
QT_RESTRICTED_CAST_FROM_ASCII | Replaced with CS_STRING_ALLOW_UNSAFE |
The following methods or overloads have been removed since they only work with Latin-1 characters. Replacement syntax is shown for each method.
Method | Description |
---|---|
append(const QByteArray &str) | Use append(QString8::fromLatin1(str)) |
prepend(const QByteArray &str) | Use prepend(QString8::fromLatin1(str)) |
setUnicode() | Construct a new QString8() which takes a const QChar32 * |
toInt | Use toInteger<int>() |
toUInt | Use toInteger<uint>() |
toLong | Use toInteger<long>() |
toULong | Use toInteger<ulong>() |
toLongLong | Use toInteger<qint64>() |
toULongLong | Use toInteger<quint64>() |
toShort | Use toInteger<short>() |
toUShort | Use toInteger<ushort>() |
The following examples show how to update code which uses the QString class.
Use replace()
Provides an STL style const reverse iterator for QString8.
Typedef for an integer type representing the distance between two elements in a QString8.
Provides an STL style non-const reverse iterator for QString8.
Typedef for an integer type representing sizes in a QString8.
Typedef for char.
Typedef for the elements stored in a QString8.
This enum describes the various normalized forms of Unicode text.
Constant | Value | Description |
---|---|---|
QString::NormalizationForm_D | 0 | Canonical Decomposition |
QString::NormalizationForm_C | 1 | Canonical Decomposition followed by Canonical Composition |
QString::NormalizationForm_KD | 2 | Compatibility Decomposition |
QString::NormalizationForm_KC | 3 | Compatibility Decomposition followed by Canonical Composition |
|
inline |
Constructs an empty string.
QString8::QString8 | ( | QChar32 | c | ) |
Constructs a string of size 1 containing the code point c.
Constructs a string of the given numOfChars with every code point set to c.
|
inline |
Constructs a string using the special Unicode character c.
|
inline |
Constructs a string using the const iterator range begin to end.
|
inline |
Constructs a string using the given string literal cStr.
|
inline |
Constructs a string initialized with str. The entire string is copied including any null characters. The contents of the QByteArray must be valid UTF-8.
This constructor will only be available if you define CS_STRING_ALLOW_UNSAFE.
|
inline |
Constructs a string using the iterator range begin to end. The elements in the range must be implicitly convertible to QChar32.
|
inline |
Constructs a string using the string view str.
|
default |
Copy constructs a new QString8 from other.
|
default |
Move constructs a new QString8 from other.
|
default |
Destroys this string.
|
inline |
Constructs a QString8 using the null terminated UTF-8 string str. Uses the specified or default constructed allocator.
The type char8_t was added in C++20. For more information refer the Using C++20 documentation.
|
inline |
Constructs a QString8 using the first size code points of the null terminated UTF-8 string str. Uses the specified or default constructed allocator.
The type char8_t was added in C++20. For more information refer the Using C++20 documentation.
|
inline |
Appends the code point c to this string and returns a reference to this string.
Appends the first numOfChars number of code points pointed to by data.
|
inline |
Appends the string other to the end of this string. Returns a reference to this string.
|
inline |
Appends from iter_begin to iter_end, to the end of this string. Returns a reference to this string.
|
inline |
Appends the code point c to this string and returns a reference to this string.
|
inline |
Appends the given string view str to this string. Returns a reference to this string.
|
inline |
Appends the given string view str to this string, beginning at position indexStart in str and continuing for the length numOfChars. Returns a reference to this string.
Returns the code point at the given position index in the string. The index must be a valid position in the string.
|
inline |
Returns the last code point in this string.
|
inline |
Returns an STL style iterator pointing to the first code point in the string.
|
inline |
Returns a const STL style iterator pointing to the first code point in the string.
|
inline |
Returns a const STL style iterator pointing to the first code point in the string.
|
inline |
Returns a const STL style iterator pointing to the imaginary item after the last code point in the string.
void QString8::chop | ( | size_type | numOfChars | ) |
|
inline |
|
inline |
Compares this string with the string str. If cs is Qt::CaseSensitive the comparison is case sensitive, otherwise the comparison is case insensitive.
|
inlinestatic |
Compares str1 with str2. If cs is Qt::CaseSensitive the comparison is case sensitive, otherwise the comparison is case insensitive.
|
inline |
Compares this string with the string view str. If cs is Qt::CaseSensitive the comparison is case sensitive, otherwise the comparison is case insensitive.
|
static |
Compares string view str1 with the string view str2. If cs is Qt::CaseSensitive the comparison is case sensitive, otherwise the comparison is case insensitive.
|
inline |
Returns a const STL style iterator pointing to the first code point in the string.
|
inline |
Returns a pointer to the null terminated data stored in the string. The pointer is valid until the string is modified.
|
inline |
Returns a const STL style iterator pointing to the imaginary item after the last code point in the string.
|
inline |
Returns true if this string contains an occurrence of the character ch, otherwise returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns true if this string contains an occurrence of the regular expression regExp, otherwise it returns false.
bool QString8::contains | ( | const QString8 & | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if this string contains an occurrence of the string str, otherwise it returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
bool QString8::contains | ( | QChar32 | c, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if this string contains an occurrence of the character c, otherwise returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
bool QString8::contains | ( | QStringView8 | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
size_type QString8::count | ( | const QRegularExpression8 & | regExp | ) | const |
Returns the number of occurrences of the regular expression regExp in the string.
size_type QString8::count | ( | const QString8 & | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns the number of (potentially overlapping) occurrences of the string str in this string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
size_type QString8::count | ( | QChar32 | c, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns the number of occurrences of character c in the string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
size_type QString8::count | ( | QStringView8 | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns the number of occurrences of the string view str in this string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns an STL style iterator pointing to the last code point in the string, in reverse order.
|
inline |
Returns a const STL style iterator pointing to the imaginary item before the first code point in the string, in reverse order.
|
inline |
Returns a pointer to the null terminated data stored in the string. The pointer is valid until the string is modified.
|
inline |
Returns true if the string has no characters, otherwise returns false.
|
inline |
Returns an STL style iterator pointing to the imaginary item after the last code point in the string.
|
inline |
Returns a const STL style iterator pointing to the imaginary item after the last code point in the string.
bool QString8::endsWith | ( | const QString8 & | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if the string ends with str, otherwise returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
bool QString8::endsWith | ( | QChar32 | c, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if the current string ends with c, otherwise returns false.
bool QString8::endsWith | ( | QStringView8 | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if the current string ends with the string view str, otherwise returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns the first code point in this string.
|
nodiscardinline |
Wrapper for QStringParser::formatArg(). In order to use this method in your application include the <QStringParser> header file.
|
nodiscardinline |
Wrapper for QStringParser::formatArgs(). In order to use this method in your application include the <QStringParser> header file.
|
static |
Constructs a new QString containing a copy of the string CFString.
|
static |
Returns a QString8 containing the first numOfChars number of Latin-1 characters specified in str. If value for numOfChars is -1 the entire str is used.
|
static |
Returns a QString8 containing the Latin-1 string str.
|
static |
Constructs a new QString containing a copy of the string NSString.
|
static |
Returns a QString8 containing the std::string str.
|
static |
Returns a QString8 containing the std::wstring str.
|
static |
Returns a QString8 containing the first numOfChars number of characters from the UTF-16 string str. If the value for numOfChars is -1 the str must be null terminated.
|
static |
Returns a QString8 containing the UTF-16 string str.
|
static |
Returns a QString8 containing the first numOfChars number of characters from the C string str. If the value for numOfChars is -1 the str must be null terminated.
|
inlinestatic |
Returns a QString8 containing the first numOfChars number of characters from the C string str. If the value for numOfChars is -1 the str must be null terminated.
The type char8_t was added in C++20. For more information refer the Using C++20 documentation.
|
static |
Returns a QString8 containing the UTF-8 string str.
|
inline |
Returns the first code point in this string.
|
inline |
Returns the index position of the first occurrence of the regular expression regExp in the string, searching forward from the index position from. Returns -1 if regExp is not found.
|
inline |
Returns the index position of the first occurrence of str in this string. The search begins at position from. Returns -1 if str is not found.
If from is -1 the search starts at the last character, if from is -2 the search starts at the next to last character, and so on. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns the index position of the first occurrence of the character c in the string, searching forward from index position from. Returns -1 if c is not found.
If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns the iterator position of the first occurrence of the regular expression regExp in the string. Returns the end iterator if the regExp is not found.
const_iterator QString8::indexOfFast | ( | const QRegularExpression8 & | regExp, |
const_iterator | from | ||
) | const |
Returns the iterator position of the first occurrence of the string view str in the string, searching forward from iterator position from. Returns the end iterator if str is not found.
|
inline |
Returns an iterator to the first occurrence of str in this string. Returns the end iterator if str is not found.
|
inline |
Returns an iterator to the first occurrence of str in this string, searching forward from iterator from. Returns the end iterator if str is not found.
If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns an iterator to the first occurrence of c in this string. Returns the end iterator if c is not found.
|
inline |
Returns an iterator to the first occurrence of c in this string, searching forward from iterator from. Returns the end iterator if c is not found.
If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns the iterator position of the first occurrence of the string view str in the string, searching forward from iterator position from. Returns the end iterator if str is not found.
If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Beginning at position first in the current string, insert str. Returns a reference to this string.
|
inline |
Beginning at position first in the current string, insert the range of characters from begin to end. Returns a reference to this string.
|
inline |
At position indexStart in the string, insert the first numOfChars number of code points pointed to by data.
|
inline |
Inserts c at the given index indexStart in the string.
|
inline |
Inserts the string view str at the given position indexStart in this string. Returns a reference to this string.
|
inline |
Inserts the string view str at the given position indexStart in the string, beginning at the position srcStart in str and continuing for the length numOfChars.
Returns a reference to this string.
|
inline |
|
inline |
Returns the last code point in this string.
|
inline |
Returns the index position of the last occurrence of the string str in this string, searching backward from index position from. Returns -1 if str is not found.
If from is -1 the search starts at the last character, if from is -2 the search starts at the next to last character, and so on. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns the index position of the last occurrence of the character c, searching backward from position from. Returns -1 if str is not found.
If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns an iterator to the last occurrence of str in this string. Returns the end iterator if str is not found.
|
inline |
Returns an iterator to the first occurrence of str in this string, searching backward from iterator from. Returns the end iterator if str is not found.
If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns an iterator to the last occurrence of c in this string. Returns the end iterator if c is not found.
|
inline |
Returns an iterator to the last occurrence of c in this string, searching backward from iterator from. Returns the end iterator if c is not found.
If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns the iterator position of the last occurrence of the string view str in this string, searching backward from iterator position from. Returns the end iterator if str is not found.
If from is -1 the search starts at the last character, if from is -2 the search starts at the next to last character, and so on. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
nodiscard |
Returns a new QString8 containing the first numOfChars code points in this string. The entire string is returned if numOfChars is greater than size() or less than zero.
|
nodiscard |
Returns a string of size width that contains this string padded by the fill character. If truncate is false and the size() of the string is more than the value of width, then the returned string is a copy of the string.
If truncate is true and the size() of the string is more than width, then any characters in a copy of the string after position width are removed, the copy is returned.
|
nodiscard |
Returns a QStringView8 containing the first numOfChars code points in this string. The entire string is returned if numOfChars is greater than size() or less than zero.
|
inline |
|
inline |
Compares string str with this string object and returns an integer based on the sort relationship of the strings. The comparison is performed platform dependent.
|
inlinestatic |
Compares string str1 with string str2 and returns an integer based on the sort relationship of the strings. The comparison is performed platform dependent.
|
inline |
Compares this string with the string view str and returns an integer based on the sort relationship of the strings. The comparison is performed platform dependent.
|
static |
Compares string view str1 with string view str2 and returns an integer based on the sort relationship of the strings. The comparison is performed platform dependent.
|
nodiscard |
Returns a string containing numOfChars characters of this string, starting at the iterator position iter.
Returns a string containing numOfChars characters of this string, starting at the position indexStart.
Returns an empty string if the index exceeds the length of the string. If there are less than numOfChars characters available in the string, starting at the given index, or if numOfChars is -1, the method returns all characters available from the specified index to the end of the string.
QStringView8 QString8::midView | ( | const_iterator | iter, |
size_type | numOfChars = -1 |
||
) | const |
Returns a QStringView8 containing the code points starting at iterator position iter for a length of numOfChars.
QStringView8 QString8::midView | ( | size_type | indexStart, |
size_type | numOfChars = -1 |
||
) | const |
Returns a QStringView8 containing the code points starting at indexStart for a length of numOfChars.
|
nodiscard |
Returns the string in the given Unicode normalization mode, according to the given version of the Unicode standard.
|
nodiscardinlinestatic |
Wrapper for QStringParser::number(). In order to use this method in your application include the <QStringParser> header file.
|
nodiscardinlinestatic |
Wrapper for QStringParser::number(). In order to use this method in your application include the <QStringParser> header file.
|
inline |
|
inline |
Appends c to this string and returns a reference to this string.
|
inline |
Appends the special Unicode character c to this string and returns a reference to this string.
|
inline |
Appends the string view str to this string.
|
default |
Copy assigns from other and returns a reference to this object.
|
inline |
Assigns c to this string and returns a reference to this string.
|
default |
Move assigns from other and returns a reference to this object.
|
inline |
Assigns the string view str to this string and returns a reference to this string.
Returns the code point at the specified index in the string. Equivalent to calling at(index)
.
|
inline |
Prepends the character c to this string and returns a reference to this string.
Prepends the first numOfChars number of characters pointed to by data.
|
inline |
|
inline |
Prepends from iter_begin to iter_end. Returns a reference to this string.
|
inline |
Prepends the character c to this string and returns a reference to this string.
|
inline |
This method is equivalent to appending the given other string onto the end of this string. It is the same as append(other)
.
|
inline |
Appends the given c character to the end of this string.
|
inline |
This method is equivalent to prepending the given other string to the beginning of this string. It is the same as prepend(other)
.
|
inline |
Prepends the given c character to the beginning of this string.
|
inline |
Returns an STL style iterator pointing to the last code point in the string, in reverse order.
|
inline |
Returns a const STL style iterator pointing to the last code point in the string, in reverse order.
|
inline |
Removes every occurrence of the regular expression regExp in the string and returns a reference to the string.
QString8 & QString8::remove | ( | const QString8 & | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) |
Removes every occurrence of the given str in this string and returns a reference to this string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
This is the same as replace(str, "", cs)
.
QString8 & QString8::remove | ( | QChar32 | c, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) |
Removes every occurrence of the character c in this string, and returns a reference to this string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
This is the same as replace(c, "", cs)
.
Removes numOfChars code points from the string, starting at the given indexStart index. Returns a reference to the string. If (indexStart + numOfChars) is beyond the end of the string, the string is truncated at the specified indexStart.
|
inline |
Returns an STL style iterator pointing to the imaginary item before the first code point in the string, in reverse order.
|
inline |
Returns a const STL style iterator pointing to the imaginary item before the first code point in the string, in reverse order.
|
nodiscard |
Returns a copy of this string repeated the specified number of count. If the value for times is less than 1, an empty string is returned.
QString8 & QString8::replace | ( | const QChar32 * | before, |
size_type | beforeSize, | ||
const QChar32 * | after, | ||
size_type | afterSize, | ||
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) |
Replaces each occurrence in this string of the first beforeSize characters of before with the first afterSize characters of after and returns a reference to this string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
QString8 & QString8::replace | ( | const QRegularExpression8 & | regExp, |
const QString8 & | after | ||
) |
Replaces every occurrence of the regular expression regExp in the string with after. Returns a reference to the string.
For regular expressions containing capturing parentheses in the pattern, occurrences of \1, \2, ..., in the passed parameter string "after" are replaced with the corresponding capture.
QString8 & QString8::replace | ( | const QString8 & | before, |
const QString8 & | after, | ||
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) |
Replaces every occurrence of the string before with the string after and returns a reference to this string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
It is of value to note the replacement text is not rescanned after it is inserted.
|
inline |
Beginning at position first replace the characters up to but not including last with str. Returns a reference to this string.
|
inline |
Replace the range from first1 to last1 with the characters from first2 to last2. Returns a reference to this string.
QString8 & QString8::replace | ( | QChar32 | before, |
QChar32 | after, | ||
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) |
QString8 & QString8::replace | ( | QChar32 | c, |
const QString8 & | after, | ||
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) |
Replaces every occurrence of the QChar32 c in this string with the string after and returns a reference to this string. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Beginning at position indexStart in this string, replace the next numOfChars with the first sizeStr code points of data. Returns a reference to this string.
|
inline |
Beginning at position indexStart in this string, replace the next numOfChars with the first sizeStr number of code points from the string str. Returns a reference to this string.
Beginning at position indexStart in this string, replace the next numOfChars with a single character c. Returns a reference to this string.
|
inline |
Sets the size of the string to numOfChars code points. If numOfChars is greater than the current size the string is extended to make it numOfChars code points long with the extra code points added to the end. The new code points are uninitialized.
If numOfChars is less than the current size, characters are removed from the end.
If you want to append a certain number of identical code points to the string, use operator+=() as follows rather than resize().
If you want to expand the string so that it reaches a certain width and fill the new positions with a particular code point, use the leftJustified() method:
If size is negative, it is equivalent to passing zero.
Sets the size of the string to numOfChars code points. If numOfChars is greater than the current size the string is extended to make it numOfChars characters long with the extra code points added to the end.
The new code points are initialized to c.
|
nodiscard |
|
nodiscard |
Returns a string of size() width that contains the fill character followed by the string.
If truncate is false and the size() of the string is more than the width, the returned string is a copy of the string.
If truncate is true and the size() of the string is more than width, the resulting string is truncated at position width.
|
nodiscard |
Returns a QStringView8 containing the last count code points in this string. The entire string is returned if numOfChars is greater than size() or less than zero.
|
inline |
Wrapper for QStringParser::section(). In order to use this method in your application include the <QStringParser> header file.
|
inline |
Wrapper for QStringParser::section(). In order to use this method in your application include the <QStringParser> header file.
|
nodiscard |
Returns a string that has whitespace removed from the start and the end, and that has each sequence of internal whitespace replaced with a single space. This method is only called if this string is an rvalue, this occurs when the string is a temporary or has been moved.
Refer to the const reference version of simplified().
|
nodiscard |
Returns a string that has whitespace removed from the start and the end, and that has each sequence of internal whitespace replaced with a single space.
Whitespace means any character for which QChar32::isSpace() returns true. This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.
|
inline |
Returns the number of code points in this string.
The last character in the string is at position size() - 1. In addition, QString8 ensures the character at position size() is always '\0' so you can use the return value of data() and constData() as arguments to functions which expect null terminated strings.
|
inline |
Returns the number of storage units in this string. The storage size is the actual bytes required in the underlying container for a string. This value will usually be larger than size().
It is normally only used when passing a QString8 to a C API which expects a pointer and a length.
|
inline |
Wrapper for QStringParser::split(). In order to use this method in your application include the <QStringParser> header file.
|
inline |
Wrapper for QStringParser::split(). In order to use this method in your application include the <QStringParser> header file.
|
inline |
Wrapper for QStringParser::split(). In order to use this method in your application include the <QStringParser> header file.
|
inline |
Releases any memory not required to store the character data. In general you will rarely ever need to call this method.
bool QString8::startsWith | ( | const QString8 & | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if the current string starts with str, otherwise returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
bool QString8::startsWith | ( | QChar32 | c, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if the string starts with c, otherwise returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
bool QString8::startsWith | ( | QStringView8 | str, |
Qt::CaseSensitivity | cs = Qt::CaseSensitive |
||
) | const |
Returns true if the current string starts with the string view str, otherwise returns false. If cs is Qt::CaseSensitive the search is case sensitive, otherwise the search is case insensitive.
|
inline |
Returns a const STL style iterator pointing to the first storage unit in the string. In UTF-8 a code point such as the Greek letter Delta is one code point and requires two storage units.
|
inline |
Returns a const STL style iterator pointing to the imaginary item after the last storage unit in the string.
|
inline |
Returns a const STL style iterator pointing to the last storage unit in the string, in reverse order.
|
inline |
Returns a const STL style iterator pointing to one before the first storage unit in the string, in reverse order.
|
inline |
Swaps other with this object. This operation is very fast and never fails.
|
nodiscard |
Converts the string to case folded and returns the converted string. This method is only called if this string is an rvalue, this occurs when the string is a temporary or has been moved.
Refer to the const reference version of toCaseFolded().
|
nodiscard |
Returns the case folded equivalent of the string. For most Unicode characters this is the same as toLower().
CFStringRef QString8::toCFString | ( | ) | const |
Creates a CFString from a QString. The caller owns the CFString and is responsible for releasing it.
|
inline |
Wrapper for QStringParser::toDouble(). In order to use this method in your application include the <QStringParser> header file.
|
inline |
Wrapper for QStringParser::toFloat(). In order to use this method in your application include the <QStringParser> header file.
QString8 QString8::toHtmlEscaped | ( | ) | const |
|
inline |
Wrapper for QStringParser::toInteger(). In order to use this method in your application include the <QStringParser> header file.
This method replaces the following set of methods: toInt, toUInt, toLong, toULong, toLongLong, toULongLong, toShort, toUShort. The required data type is passed as the template parameter to this method. The following example shows how to specify long as the type argument.
|
nodiscard |
Returns a Latin-1 representation of the string as a QByteArray. All code points which can not be represented in Latin-1 will be replaced with a question mark.
|
nodiscard |
Converts the string to lowercase and returns the converted string. This method is only called if this string is an rvalue, this occurs when the string is a temporary or has been moved.
Refer to the const reference version of toLower().
|
nodiscard |
Returns a lowercase copy of the string.
The case conversion will always happen in the 'C' locale. For locale dependent lower casing use QLocale::toLower().
NSString * QString8::toNSString | ( | ) | const |
Creates a NSString from a QString. The NSString is autoreleased.
|
inline |
Returns this string as an std::string encoded in UTF-8.
std::wstring QString8::toStdWString | ( | ) | const |
Returns this string as an std::wstring encoded in UTF-8.
|
nodiscard |
Converts the string to uppercase and returns the converted string. This method is only called if this string is an rvalue, this occurs when the string is a temporary or has been moved.
Refer to the const reference version of toUpper().
|
nodiscard |
Returns an uppercase copy of the string.
The case conversion will always happen in the 'C' locale. For locale dependent upper casing use QLocale::toUpper().
|
nodiscard |
Returns this string as a QByteArray.
|
nodiscard |
Trims the string and returns the trimmed string. This method is only called if this string is an rvalue, this occurs when the string is a temporary or has been moved.
Refer to the const reference version of the method trimmed().
|
nodiscard |
Returns a string that has whitespace removed from the start and the end. Whitespace means any character for which QChar32::isSpace() returns true. This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.
Unlike simplified(), trimmed() leaves internal whitespace alone.
void QString8::truncate | ( | size_type | length | ) |
|
inline |
Returns a pointer to the null terminated data stored in the string. The pointer is valid until the string is modified.
|
related |
Returns true if the C string cString is not equal to the string str, otherwise returns false.
|
related |
Returns true if the string str is not equal to the C string cString, otherwise returns false.
|
related |
Returns true if str1 is not equal to string str2, otherwise returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns a string which is the result of concatenating string literal cString and the string str.
|
related |
Returns a string which is the result of concatenating str and the string literal cString.
|
related |
Returns a string which is the result of concatenating the string str and the character c.
|
related |
Returns a string which is the result of concatenating str1 and str2.
|
related |
Returns a string which is the result of concatenating the character c and the string str.
|
related |
Returns a string which is the result of concatenating str and the string literal cString. This method is only called if the string is an rvalue, this occurs when the string is a temporary or has been moved.
|
related |
Returns a string which is the result of concatenating the string str and the character c. This method is only called if the string is an rvalue, this occurs when the string is a temporary or has been moved.
|
related |
Returns a string which is the result of concatenating str1 and str2. This method is only called if str1 is an rvalue, this occurs when the string is a temporary or has been moved.
|
related |
Returns true if the C string cString is lexically less than string str, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str is lexically less than C string cString, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str1 is lexically less than string str2, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Writes the given str to the stream. Returns a reference to the stream.
Refer to Serializing Data Types for additional information.
|
related |
Returns true if the C string cString is lexically less than or equal to than string str, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str is lexically less than or equal to than C string cString, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str1 is lexically less than or equal to than string str2, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the C string cString is equal to string str, otherwise returns false.
|
related |
Returns true if string str is equal to the C string cString, otherwise returns false.
|
related |
Returns true if string str1 is equal to str2, otherwise returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the C string cString is lexically greater than string str, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str is lexically greater than C string cString, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str1 is lexically greater than string str2, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the C string cString is lexically greater than or equal to than string str, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str is lexically greater than or equal to than C string cString, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Returns true if the string str1 is lexically greater than or equal to than string str2, otherwise it returns false.
The comparison is based exclusively on the numeric Unicode values of the code points and is very fast, but may not be what a person would expect.
|
related |
Reads from the stream into the given str. Returns a reference to the stream.
Refer to Serializing Data Types for additional information.
|
related |
Typedef for QString8.
|
related |
Swaps string str1 with str2. This operation is very fast and never fails.