QtBase  v6.3.1
Public Types | Public Member Functions | Friends | List of all members
QLatin1String Class Reference

The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal. More...

#include <qstring.h>

Public Types

using value_type = const char
 
using reference = value_type &
 
using const_reference = reference
 
using iterator = value_type *
 
using const_iterator = iterator
 
using difference_type = qsizetype
 
using size_type = qsizetype
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = reverse_iterator
 

Public Member Functions

constexpr QLatin1String () noexcept
 
constexpr QLatin1String (const char *s) noexcept
 
constexpr QLatin1String (const char *f, const char *l)
 
constexpr QLatin1String (const char *s, qsizetype sz) noexcept
 
 QLatin1String (const QByteArray &s) noexcept
 
constexpr QLatin1String (QByteArrayView s) noexcept
 
QString toString () const
 
constexpr const char * latin1 () const noexcept
 
constexpr qsizetype size () const noexcept
 
constexpr const char * data () const noexcept
 
constexpr bool isNull () const noexcept
 
constexpr bool isEmpty () const noexcept
 
template<typename... Args>
QString arg (Args &&...args) const
 
constexpr QLatin1Char at (qsizetype i) const
 
constexpr QLatin1Char operator[] (qsizetype i) const
 
constexpr QLatin1Char front () const
 
constexpr QLatin1Char back () const
 
int compare (QStringView other, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
int compare (QLatin1String other, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
constexpr int compare (QChar c) const noexcept
 
int compare (QChar c, Qt::CaseSensitivity cs) const noexcept
 
bool startsWith (QStringView s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
bool startsWith (QLatin1String s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
constexpr bool startsWith (QChar c) const noexcept
 
bool startsWith (QChar c, Qt::CaseSensitivity cs) const noexcept
 
bool endsWith (QStringView s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
bool endsWith (QLatin1String s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
constexpr bool endsWith (QChar c) const noexcept
 
bool endsWith (QChar c, Qt::CaseSensitivity cs) const noexcept
 
qsizetype indexOf (QStringView s, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype indexOf (QLatin1String s, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype indexOf (QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
bool contains (QStringView s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
bool contains (QLatin1String s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
bool contains (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype lastIndexOf (QStringView s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype lastIndexOf (QStringView s, qsizetype from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype lastIndexOf (QLatin1String s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype lastIndexOf (QLatin1String s, qsizetype from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype lastIndexOf (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
qsizetype lastIndexOf (QChar c, qsizetype from, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr const_iterator cend () const noexcept
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crend () const noexcept
 
constexpr QLatin1String mid (qsizetype pos, qsizetype n=-1) const
 
constexpr QLatin1String left (qsizetype n) const
 
constexpr QLatin1String right (qsizetype n) const
 
constexpr QLatin1String sliced (qsizetype pos) const
 
constexpr QLatin1String sliced (qsizetype pos, qsizetype n) const
 
constexpr QLatin1String first (qsizetype n) const
 
constexpr QLatin1String last (qsizetype n) const
 
constexpr QLatin1String chopped (qsizetype n) const
 
constexpr void chop (qsizetype n)
 
constexpr void truncate (qsizetype n)
 
QLatin1String trimmed () const noexcept
 
template<typename Needle , typename... Flags>
constexpr auto tokenize (Needle &&needle, Flags...flags) const noexcept(noexcept(qTokenize(std::declval< const QLatin1String & >(), std::forward< Needle >(needle), flags...))) -> decltype(qTokenize(*this, std::forward< Needle >(needle), flags...))
 
QT_ASCII_CAST_WARN bool operator== (const char *s) const
 
QT_ASCII_CAST_WARN bool operator!= (const char *s) const
 
QT_ASCII_CAST_WARN bool operator< (const char *s) const
 
QT_ASCII_CAST_WARN bool operator> (const char *s) const
 
QT_ASCII_CAST_WARN bool operator<= (const char *s) const
 
QT_ASCII_CAST_WARN bool operator>= (const char *s) const
 
QT_ASCII_CAST_WARN bool operator== (const QByteArray &s) const
 
QT_ASCII_CAST_WARN bool operator!= (const QByteArray &s) const
 
QT_ASCII_CAST_WARN bool operator< (const QByteArray &s) const
 
QT_ASCII_CAST_WARN bool operator> (const QByteArray &s) const
 
QT_ASCII_CAST_WARN bool operator<= (const QByteArray &s) const
 
QT_ASCII_CAST_WARN bool operator>= (const QByteArray &s) const
 
template<typename... Args>
Q_ALWAYS_INLINE QString arg (Args &&...args) const
 

Friends

bool operator== (QLatin1String s1, QLatin1String s2) noexcept
 
bool operator!= (QLatin1String s1, QLatin1String s2) noexcept
 
bool operator< (QLatin1String s1, QLatin1String s2) noexcept
 
bool operator> (QLatin1String s1, QLatin1String s2) noexcept
 
bool operator<= (QLatin1String s1, QLatin1String s2) noexcept
 
bool operator>= (QLatin1String s1, QLatin1String s2) noexcept
 
bool operator== (QChar lhs, QLatin1String rhs) noexcept
 
bool operator< (QChar lhs, QLatin1String rhs) noexcept
 
bool operator> (QChar lhs, QLatin1String rhs) noexcept
 
bool operator!= (QChar lhs, QLatin1String rhs) noexcept
 
bool operator<= (QChar lhs, QLatin1String rhs) noexcept
 
bool operator>= (QChar lhs, QLatin1String rhs) noexcept
 
bool operator== (QLatin1String lhs, QChar rhs) noexcept
 
bool operator!= (QLatin1String lhs, QChar rhs) noexcept
 
bool operator< (QLatin1String lhs, QChar rhs) noexcept
 
bool operator> (QLatin1String lhs, QChar rhs) noexcept
 
bool operator<= (QLatin1String lhs, QChar rhs) noexcept
 
bool operator>= (QLatin1String lhs, QChar rhs) noexcept
 
bool operator== (QStringView lhs, QLatin1String rhs) noexcept
 
bool operator!= (QStringView lhs, QLatin1String rhs) noexcept
 
bool operator< (QStringView lhs, QLatin1String rhs) noexcept
 
bool operator<= (QStringView lhs, QLatin1String rhs) noexcept
 
bool operator> (QStringView lhs, QLatin1String rhs) noexcept
 
bool operator>= (QStringView lhs, QLatin1String rhs) noexcept
 
bool operator== (QLatin1String lhs, QStringView rhs) noexcept
 
bool operator!= (QLatin1String lhs, QStringView rhs) noexcept
 
bool operator< (QLatin1String lhs, QStringView rhs) noexcept
 
bool operator<= (QLatin1String lhs, QStringView rhs) noexcept
 
bool operator> (QLatin1String lhs, QStringView rhs) noexcept
 
bool operator>= (QLatin1String lhs, QStringView rhs) noexcept
 
QT_ASCII_CAST_WARN friend bool operator== (const char *s1, QLatin1String s2)
 
QT_ASCII_CAST_WARN friend bool operator!= (const char *s1, QLatin1String s2)
 
QT_ASCII_CAST_WARN friend bool operator< (const char *s1, QLatin1String s2)
 
QT_ASCII_CAST_WARN friend bool operator> (const char *s1, QLatin1String s2)
 
QT_ASCII_CAST_WARN friend bool operator<= (const char *s1, QLatin1String s2)
 
QT_ASCII_CAST_WARN friend bool operator>= (const char *s1, QLatin1String s2)
 

Detailed Description

The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.

\inmodule QtCore

\reentrant

Many of QString's member functions are overloaded to accept {const char *} instead of QString. This includes the copy constructor, the assignment operator, the comparison operators, and various other functions such as \l{QString::insert()}{insert()}, \l{QString::replace()}{replace()}, and \l{QString::indexOf()}{indexOf()}. These functions are usually optimized to avoid constructing a QString object for the {const char *} data. For example, assuming str is a QString,

is much faster than

because it doesn't construct four temporary QString objects and make a deep copy of the character data.

Applications that define \l QT_NO_CAST_FROM_ASCII (as explained in the QString documentation) don't have access to QString's {const char *} API. To provide an efficient way of specifying constant Latin-1 strings, Qt provides the QLatin1String, which is just a very thin wrapper around a {const char *}. Using QLatin1String, the example code above becomes

This is a bit longer to type, but it provides exactly the same benefits as the first version of the code, and is faster than converting the Latin-1 strings using QString::fromLatin1().

Thanks to the QString(QLatin1String) constructor, QLatin1String can be used everywhere a QString is expected. For example:

Note
If the function you're calling with a QLatin1String argument isn't actually overloaded to take QLatin1String, the implicit conversion to QString will trigger a memory allocation, which is usually what you want to avoid by using QLatin1String in the first place. In those cases, using QStringLiteral may be the better option.
See also
QString, QLatin1Char, {QStringLiteral()}{QStringLiteral}, QT_NO_CAST_FROM_ASCII

Definition at line 83 of file qstring.h.

Member Typedef Documentation

◆ const_iterator

Since
5.10
See also
iterator, const_reverse_iterator

Definition at line 171 of file qstring.h.

◆ const_reference

Since
5.11

Alias for {reference}. Provided for compatibility with the STL.

Definition at line 169 of file qstring.h.

◆ const_reverse_iterator

Since
5.10
See also
reverse_iterator, const_iterator

Definition at line 181 of file qstring.h.

◆ difference_type

Since
5.10

Alias for {qsizetype}. Provided for compatibility with the STL.

Definition at line 172 of file qstring.h.

◆ iterator

Since
5.10

QLatin1String does not support mutable iterators, so this is the same as const_iterator.

See also
const_iterator, reverse_iterator

Definition at line 170 of file qstring.h.

◆ reference

Since
5.10

Alias for {value_type &}. Provided for compatibility with the STL.

Definition at line 168 of file qstring.h.

◆ reverse_iterator

Since
5.10

QLatin1String does not support mutable reverse iterators, so this is the same as const_reverse_iterator.

See also
const_reverse_iterator, iterator

Definition at line 180 of file qstring.h.

◆ size_type

Since
5.10

Alias for {qsizetype}. Provided for compatibility with the STL.

Note
In version prior to Qt 6, this was an alias for {int}, restricting the amount of data that could be held in a QLatin1String on 64-bit architectures.

Definition at line 173 of file qstring.h.

◆ value_type

Since
5.10

Alias for {const char}. Provided for compatibility with the STL.

Definition at line 167 of file qstring.h.

Constructor & Destructor Documentation

◆ QLatin1String() [1/6]

QLatin1String::QLatin1String ( )
inlineconstexprnoexcept
Since
5.6

Constructs a QLatin1String object that stores a nullptr.

Definition at line 86 of file qstring.h.

Here is the caller graph for this function:

◆ QLatin1String() [2/6]

QLatin1String::QLatin1String ( const char *  str)
inlineexplicitconstexprnoexcept

Constructs a QLatin1String object that stores str.

The string data is not copied. The caller must be able to guarantee that str will not be deleted or modified as long as the QLatin1String object exists.

See also
latin1()

Definition at line 87 of file qstring.h.

◆ QLatin1String() [3/6]

QLatin1String::QLatin1String ( const char *  first,
const char *  last 
)
inlineexplicitconstexpr
Since
5.10

Constructs a QLatin1String object that stores first with length (last - first).

The range {[first,last)} must remain valid for the lifetime of this Latin-1 string object.

Passing \nullptr as first is safe if last is \nullptr, too, and results in a null Latin-1 string.

The behavior is undefined if last precedes first, first is \nullptr and last is not, or if {last - first > INT_MAX}.

Definition at line 88 of file qstring.h.

◆ QLatin1String() [4/6]

QLatin1String::QLatin1String ( const char *  str,
qsizetype  size 
)
inlineexplicitconstexprnoexcept

Constructs a QLatin1String object that stores str with size.

The string data is not copied. The caller must be able to guarantee that str will not be deleted or modified as long as the QLatin1String object exists.

Note
: any null ('\0') bytes in the byte array will be included in this string, which will be converted to Unicode null characters (U+0000) if this string is used by QString. This behavior is different from Qt 5.x.
See also
latin1()

Definition at line 90 of file qstring.h.

◆ QLatin1String() [5/6]

QLatin1String::QLatin1String ( const QByteArray str)
inlineexplicitnoexcept

Constructs a QLatin1String object that stores str.

The string data is not copied. The caller must be able to guarantee that str will not be deleted or modified as long as the QLatin1String object exists.

See also
latin1()

Definition at line 91 of file qstring.h.

◆ QLatin1String() [6/6]

QLatin1String::QLatin1String ( QByteArrayView  str)
inlineexplicitconstexprnoexcept
Since
6.3

Constructs a QLatin1String object that stores str.

The string data is not copied. The caller must be able to guarantee that the data which str is pointing to will not be deleted or modified as long as the QLatin1String object exists. The size is obtained from str as-is, without checking for a null-terminator.

Note
: any null ('\0') bytes in the byte array will be included in this string, which will be converted to Unicode null characters (U+0000) if this string is used by QString.
See also
latin1()

Definition at line 92 of file qstring.h.

Member Function Documentation

◆ arg() [1/2]

template<typename... Args>
template< typename...Args > QString QLatin1String::arg ( Args &&...  args) const
inline
Here is the caller graph for this function:

◆ arg() [2/2]

template<typename... Args>
Q_ALWAYS_INLINE QString QLatin1String::arg ( Args &&...  args) const

Definition at line 1554 of file qstring.h.

Here is the call graph for this function:

◆ at()

QLatin1Char QLatin1String::at ( qsizetype  pos) const
inlineconstexpr
Since
5.8

Returns the character at position pos in this object.

Note
This function performs no error checking. The behavior is undefined when pos < 0 or pos >= size().
See also
operator[]()

Definition at line 106 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ back()

QLatin1Char QLatin1String::back ( ) const
inlineconstexpr
Since
5.10

Returns the last character in the string. Same as {at(size() - 1)}.

This function is provided for STL compatibility.

Warning
Calling this function on an empty string constitutes undefined behavior.
See also
front(), at(), operator[]()

Definition at line 111 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ begin()

QLatin1String::const_iterator QLatin1String::begin ( ) const
inlineconstexprnoexcept
Since
5.10

Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first character in the string.

This function is provided for STL compatibility.

See also
end(), cbegin(), rbegin(), data()

Definition at line 175 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbegin()

QLatin1String::const_iterator QLatin1String::cbegin ( ) const
inlineconstexprnoexcept
Since
5.10

Same as begin().

This function is provided for STL compatibility.

See also
cend(), begin(), crbegin(), data()

Definition at line 176 of file qstring.h.

Here is the call graph for this function:

◆ cend()

QLatin1String::const_iterator QLatin1String::cend ( ) const
inlineconstexprnoexcept
Since
5.10

Same as end().

This function is provided for STL compatibility.

See also
cbegin(), end(), crend()

Definition at line 178 of file qstring.h.

Here is the call graph for this function:

◆ chop()

void QLatin1String::chop ( qsizetype  length)
inlineconstexpr
Since
5.10

Truncates this string by length characters.

Same as {*this = left(size() - length)}.

Note
The behavior is undefined when length < 0 or length > size().
See also
sliced(), first(), last(), chopped(), truncate()

Definition at line 218 of file qstring.h.

◆ chopped()

QLatin1String QLatin1String::chopped ( qsizetype  length) const
inlineconstexpr
Since
5.10

Returns the substring of length size() - length starting at the beginning of this object.

Same as {left(size() - length)}.

Note
The behavior is undefined when length < 0 or length > size().
See also
sliced(), first(), last(), chop(), truncate()

Definition at line 215 of file qstring.h.

Here is the call graph for this function:

◆ compare() [1/4]

int QLatin1String::compare ( QChar  c) const
inlineconstexprnoexcept

Definition at line 117 of file qstring.h.

Here is the call graph for this function:

◆ compare() [2/4]

int QLatin1String::compare ( QChar  ch,
Qt::CaseSensitivity  cs 
) const
inlinenoexcept
Since
5.14

Returns an integer that compares to zero as this Latin-1 string compares to the string-view str, Latin-1 string l1, or character ch, respectively.

If cs is Qt::CaseSensitive (the default), the comparison is case sensitive; otherwise the comparison is case-insensitive.

See also
operator==(), operator<(), operator>()

Definition at line 119 of file qstring.h.

Here is the call graph for this function:

◆ compare() [3/4]

int QLatin1String::compare ( QLatin1String  other,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 115 of file qstring.h.

Here is the call graph for this function:

◆ compare() [4/4]

int QLatin1String::compare ( QStringView  other,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 113 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contains() [1/3]

bool QLatin1String::contains ( QChar  c,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
5.14

Returns true if this Latin-1 string contains an occurrence of the string-view str, Latin-1 string l1, or character ch; otherwise returns false.

If cs is Qt::CaseSensitive (the default), the search is case-sensitive; otherwise the search is case-insensitive.

See also
indexOf(), QStringView::contains(), QStringView::indexOf(), QString::indexOf()

Definition at line 151 of file qstring.h.

Here is the call graph for this function:

◆ contains() [2/3]

bool QLatin1String::contains ( QLatin1String  s,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 149 of file qstring.h.

Here is the call graph for this function:

◆ contains() [3/3]

bool QLatin1String::contains ( QStringView  s,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 147 of file qstring.h.

Here is the call graph for this function:

◆ crbegin()

QLatin1String::const_reverse_iterator QLatin1String::crbegin ( ) const
inlinenoexcept
Since
5.10

Same as rbegin().

This function is provided for STL compatibility.

See also
crend(), rbegin(), cbegin()

Definition at line 184 of file qstring.h.

Here is the call graph for this function:

◆ crend()

QLatin1String::const_reverse_iterator QLatin1String::crend ( ) const
inlinenoexcept
Since
5.10

Same as rend().

This function is provided for STL compatibility.

See also
crbegin(), rend(), cend()

Definition at line 186 of file qstring.h.

Here is the call graph for this function:

◆ data()

const char * QLatin1String::data ( ) const
inlineconstexprnoexcept

Returns the Latin-1 string stored in this object.

Definition at line 98 of file qstring.h.

Here is the caller graph for this function:

◆ end()

QLatin1String::const_iterator QLatin1String::end ( ) const
inlineconstexprnoexcept
Since
5.10

Returns a const \l{STL-style iterators}{STL-style iterator} pointing just after the last character in the string.

This function is provided for STL compatibility.

See also
begin(), cend(), rend()

Definition at line 177 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ endsWith() [1/4]

bool QLatin1String::endsWith ( QChar  ch) const
inlineconstexprnoexcept
Since
5.10

Definition at line 135 of file qstring.h.

Here is the call graph for this function:

◆ endsWith() [2/4]

bool QLatin1String::endsWith ( QChar  ch,
Qt::CaseSensitivity  cs 
) const
inlinenoexcept
Since
5.10

Returns true if this Latin-1 string ends with string-view str, Latin-1 string l1, or character ch, respectively; otherwise returns false.

If cs is Qt::CaseSensitive (the default), the search is case-sensitive; otherwise the search is case-insensitive.

See also
startsWith()

Definition at line 137 of file qstring.h.

Here is the call graph for this function:

◆ endsWith() [3/4]

bool QLatin1String::endsWith ( QLatin1String  l1,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
5.10

Definition at line 133 of file qstring.h.

Here is the call graph for this function:

◆ endsWith() [4/4]

bool QLatin1String::endsWith ( QStringView  str,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
5.10

Definition at line 131 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ first()

QLatin1String QLatin1String::first ( qsizetype  n) const
inlineconstexpr
Since
6.0

Returns a Latin-1 string that contains the first n characters of this Latin-1 string.

Note
The behavior is undefined when n < 0 or n > size().
See also
last(), startsWith(), chopped(), chop(), truncate()

Definition at line 211 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ front()

QLatin1Char QLatin1String::front ( ) const
inlineconstexpr
Since
5.10

Returns the first character in the string. Same as {at(0)}.

This function is provided for STL compatibility.

Warning
Calling this function on an empty string constitutes undefined behavior.
See also
back(), at(), operator[]()

Definition at line 110 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ indexOf() [1/3]

qsizetype QLatin1String::indexOf ( QChar  c,
qsizetype  from = 0,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
5.14

Returns the index position of the first occurrence of the string-view str, Latin-1 string l1, or character ch, respectively, in this Latin-1 string, 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.

See also
QString::indexOf()

Definition at line 144 of file qstring.h.

Here is the call graph for this function:

◆ indexOf() [2/3]

qsizetype QLatin1String::indexOf ( QLatin1String  s,
qsizetype  from = 0,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 142 of file qstring.h.

Here is the call graph for this function:

◆ indexOf() [3/3]

qsizetype QLatin1String::indexOf ( QStringView  s,
qsizetype  from = 0,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 140 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEmpty()

bool QLatin1String::isEmpty ( ) const
inlineconstexprnoexcept
Since
5.10

Returns whether the Latin-1 string stored in this object is empty ({size() == 0}) or not.

See also
isNull(), size()

Definition at line 101 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNull()

bool QLatin1String::isNull ( ) const
inlineconstexprnoexcept
Since
5.10

Returns whether the Latin-1 string stored in this object is null ({data() == nullptr}) or not.

See also
isEmpty(), data()

Definition at line 100 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ last()

QLatin1String QLatin1String::last ( qsizetype  n) const
inlineconstexpr
Since
6.0

Returns a Latin-1 string that contains the last n characters of this Latin-1 string.

Note
The behavior is undefined when n < 0 or n > size().
See also
first(), endsWith(), chopped(), chop(), truncate()

Definition at line 213 of file qstring.h.

Here is the call graph for this function:

◆ lastIndexOf() [1/6]

qsizetype QLatin1String::lastIndexOf ( QChar  c,
qsizetype  from,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
5.14

Returns the index position of the last occurrence of the string-view str, Latin-1 string l1, or character ch, respectively, in this Latin-1 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, at the next to last character and so on.

If cs is Qt::CaseSensitive (default), the search is case sensitive; otherwise the search is case insensitive.

Note
When searching for a 0-length str or l1, the match at the end of the data is excluded from the search by a negative from, even though {-1} is normally thought of as searching from the end of the string: the match at the end is after the last character, so it is excluded. To include such a final empty match, either give a positive value for from or omit the from parameter entirely.
See also
indexOf(), QStringView::lastIndexOf(), QStringView::indexOf(), QString::indexOf()

Definition at line 164 of file qstring.h.

Here is the call graph for this function:

◆ lastIndexOf() [2/6]

qsizetype QLatin1String::lastIndexOf ( QChar  ch,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
6.3 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 162 of file qstring.h.

Here is the call graph for this function:

◆ lastIndexOf() [3/6]

qsizetype QLatin1String::lastIndexOf ( QLatin1String  s,
qsizetype  from,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 160 of file qstring.h.

Here is the call graph for this function:

◆ lastIndexOf() [4/6]

qsizetype QLatin1String::lastIndexOf ( QLatin1String  s,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 158 of file qstring.h.

Here is the call graph for this function:

◆ lastIndexOf() [5/6]

qsizetype QLatin1String::lastIndexOf ( QStringView  s,
qsizetype  from,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 156 of file qstring.h.

Here is the call graph for this function:

◆ lastIndexOf() [6/6]

qsizetype QLatin1String::lastIndexOf ( QStringView  s,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept

Definition at line 154 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ latin1()

const char * QLatin1String::latin1 ( ) const
inlineconstexprnoexcept

Returns the Latin-1 string stored in this object.

Definition at line 96 of file qstring.h.

Here is the caller graph for this function:

◆ left()

QLatin1String QLatin1String::left ( qsizetype  length) const
inlineconstexpr
Since
5.8

If you know that length cannot be out of bounds, use first() instead in new code, because it is faster.

Returns the substring of length length starting at position 0 in this Latin-1 string.

The entire Latin-1 string is returned if length is greater than or equal to size(), or less than zero.

See also
first(), last(), sliced(), startsWith(), chopped(), chop(), truncate()

Definition at line 194 of file qstring.h.

Here is the call graph for this function:

◆ mid()

QLatin1String QLatin1String::mid ( qsizetype  start,
qsizetype  length = -1 
) const
inlineconstexpr
Since
5.8

Returns the substring of length length starting at position start in this Latin-1 string.

If you know that start and length cannot be out of bounds, use sliced() instead in new code, because it is faster.

Returns an empty Latin-1 string if start exceeds the length of this Latin-1 string. If there are less than length characters available in this Latin-1 string starting at start, or if length is negative (default), the function returns all characters that are available from start.

See also
first(), last(), sliced(), chopped(), chop(), truncate()

Definition at line 188 of file qstring.h.

Here is the call graph for this function:

◆ operator!=() [1/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator!= ( const char *  other) const
inline
Since
4.3

Returns true if this string is not equal to const char pointer other; otherwise returns false.

The other const char pointer is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

See also
{Comparing Strings}

Definition at line 1374 of file qstring.h.

Here is the call graph for this function:

◆ operator!=() [2/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator!= ( const QByteArray s) const
inline

Definition at line 1387 of file qstring.h.

Here is the call graph for this function:

◆ operator<() [1/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator< ( const char *  other) const
inline
Since
4.3

Returns true if this string is lexically less than const char pointer other; otherwise returns false.

The other const char pointer is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

See also
{Comparing Strings}

Definition at line 1376 of file qstring.h.

Here is the call graph for this function:

◆ operator<() [2/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator< ( const QByteArray other) const
inline
Since
5.0 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

The other byte array is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

Definition at line 1389 of file qstring.h.

Here is the call graph for this function:

◆ operator<=() [1/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator<= ( const char *  other) const
inline
Since
4.3

Returns true if this string is lexically less than or equal to const char pointer other; otherwise returns false.

The other const char pointer is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

See also
{Comparing Strings}

Definition at line 1380 of file qstring.h.

Here is the call graph for this function:

◆ operator<=() [2/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator<= ( const QByteArray other) const
inline
Since
5.0 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

The other byte array is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

Definition at line 1393 of file qstring.h.

Here is the call graph for this function:

◆ operator==() [1/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator== ( const char *  other) const
inline
Since
4.3

Returns true if the string is equal to const char pointer other; otherwise returns false.

The other const char pointer is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

See also
{Comparing Strings}

Definition at line 1372 of file qstring.h.

Here is the call graph for this function:

◆ operator==() [2/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator== ( const QByteArray other) const
inline
Since
5.0 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

The other byte array is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

Definition at line 1385 of file qstring.h.

Here is the call graph for this function:

◆ operator>() [1/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator> ( const char *  other) const
inline
Since
4.3

Returns true if this string is lexically greater than const char pointer other; otherwise returns false.

The other const char pointer is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

See also
{Comparing Strings}

Definition at line 1378 of file qstring.h.

Here is the call graph for this function:

◆ operator>() [2/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator> ( const QByteArray other) const
inline
Since
5.0 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

The other byte array is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

Definition at line 1391 of file qstring.h.

Here is the call graph for this function:

◆ operator>=() [1/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator>= ( const char *  other) const
inline
Since
4.3

Returns true if this string is lexically greater than or equal to const char pointer other; otherwise returns false.

The other const char pointer is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

See also
{Comparing Strings}

Definition at line 1382 of file qstring.h.

Here is the call graph for this function:

◆ operator>=() [2/2]

QT_ASCII_CAST_WARN bool QLatin1String::operator>= ( const QByteArray other) const
inline
Since
5.0 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

The other byte array is converted to a QString using the QString::fromUtf8() function.

You can disable this operator by defining \l QT_NO_CAST_FROM_ASCII when you compile your applications. This can be useful if you want to ensure that all user-visible strings go through QObject::tr(), for example.

Definition at line 1395 of file qstring.h.

Here is the call graph for this function:

◆ operator[]()

QLatin1Char QLatin1String::operator[] ( qsizetype  pos) const
inlineconstexpr
Since
5.8

Returns the character at position pos in this object.

Note
This function performs no error checking. The behavior is undefined when pos < 0 or pos >= size().
See also
at()

Definition at line 108 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbegin()

QLatin1String::const_reverse_iterator QLatin1String::rbegin ( ) const
inlinenoexcept
Since
5.10

Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to the first character in the string, in reverse order.

This function is provided for STL compatibility.

See also
rend(), crbegin(), begin()

Definition at line 183 of file qstring.h.

Here is the call graph for this function:

◆ rend()

QLatin1String::const_reverse_iterator QLatin1String::rend ( ) const
inlinenoexcept
Since
5.10

Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing just after the last character in the string, in reverse order.

This function is provided for STL compatibility.

See also
rbegin(), crend(), end()

Definition at line 185 of file qstring.h.

Here is the call graph for this function:

◆ right()

QLatin1String QLatin1String::right ( qsizetype  length) const
inlineconstexpr
Since
5.8

If you know that length cannot be out of bounds, use last() instead in new code, because it is faster.

Returns the substring of length length starting at position size() - length in this Latin-1 string.

The entire Latin-1 string is returned if length is greater than or equal to size(), or less than zero.

See also
first(), last(), sliced(), endsWith(), chopped(), chop(), truncate()

Definition at line 200 of file qstring.h.

Here is the call graph for this function:

◆ size()

qsizetype QLatin1String::size ( ) const
inlineconstexprnoexcept

Returns the size of the Latin-1 string stored in this object.

Note
In version prior to Qt 6, this function returned {int}, restricting the amount of data that could be held in a QLatin1String on 64-bit architectures.

Definition at line 97 of file qstring.h.

Here is the caller graph for this function:

◆ sliced() [1/2]

QLatin1String QLatin1String::sliced ( qsizetype  pos) const
inlineconstexpr
Since
6.0

Returns a Latin-1 string starting at position pos in this Latin-1 string, and extending to its end.

Note
The behavior is undefined when pos < 0 or pos > size().
See also
first(), last(), chopped(), chop(), truncate()

Definition at line 207 of file qstring.h.

Here is the call graph for this function:

◆ sliced() [2/2]

QLatin1String QLatin1String::sliced ( qsizetype  pos,
qsizetype  n 
) const
inlineconstexpr
Since
6.0

Returns a Latin-1 string that points to n characters of this Latin-1 string, starting at position pos.

Note
The behavior is undefined when pos < 0, n < 0, or {pos + n > size()}.
See also
first(), last(), chopped(), chop(), truncate()

Definition at line 209 of file qstring.h.

Here is the call graph for this function:

◆ startsWith() [1/4]

bool QLatin1String::startsWith ( QChar  ch) const
inlineconstexprnoexcept
Since
5.10

Definition at line 126 of file qstring.h.

Here is the call graph for this function:

◆ startsWith() [2/4]

bool QLatin1String::startsWith ( QChar  ch,
Qt::CaseSensitivity  cs 
) const
inlinenoexcept
Since
5.10

Returns true if this Latin-1 string starts with string-view str, Latin-1 string l1, or character ch, respectively; otherwise returns false.

If cs is Qt::CaseSensitive (the default), the search is case-sensitive; otherwise the search is case-insensitive.

See also
endsWith()

Definition at line 128 of file qstring.h.

Here is the call graph for this function:

◆ startsWith() [3/4]

bool QLatin1String::startsWith ( QLatin1String  l1,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
5.10

Definition at line 124 of file qstring.h.

Here is the call graph for this function:

◆ startsWith() [4/4]

bool QLatin1String::startsWith ( QStringView  str,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inlinenoexcept
Since
5.10

Definition at line 122 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tokenize()

template<typename Needle , typename... Flags>
template< typename Needle, typename...Flags > auto QLatin1String::tokenize ( Needle &&  needle,
Flags...  flags 
) const -> decltype(qTokenize(*this, std::forward<Needle>(needle), flags...))
inlineconstexprnoexcept

Definition at line 226 of file qstring.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

QString QLatin1String::toString ( ) const
inline
Since
6.0

Converts this Latin-1 string into a QString. Equivalent to

return QString(*this);
#define QString()
Definition: parse-defines.h:51

Definition at line 1159 of file qstring.h.

Here is the caller graph for this function:

◆ trimmed()

QLatin1String QLatin1String::trimmed ( ) const
inlinenoexcept
Since
5.10

Strips leading and trailing whitespace and returns the result.

Whitespace means any character for which QChar::isSpace() returns true. This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.

Definition at line 223 of file qstring.h.

Here is the call graph for this function:

◆ truncate()

void QLatin1String::truncate ( qsizetype  length)
inlineconstexpr
Since
5.10

Truncates this string to length length.

Same as {*this = left(length)}.

Note
The behavior is undefined when length < 0 or length > size().
See also
sliced(), first(), last(), chopped(), chop()

Definition at line 220 of file qstring.h.

Friends And Related Function Documentation

◆ operator!= [1/6]

bool QLatin1String::operator!= ( const char *  s1,
QLatin1String  s2 
)
friend

Returns true if const char pointer s1 is lexically not equal to string s2; otherwise returns false.

Definition at line 297 of file qstring.h.

◆ operator!= [2/6]

bool QLatin1String::operator!= ( QChar  ch,
QLatin1String  s 
)
friend

Returns true if char ch is lexically not equal to string s; otherwise returns false.

Definition at line 252 of file qstring.h.

◆ operator!= [3/6]

bool QLatin1String::operator!= ( QLatin1String  s,
QChar  ch 
)
friend

Returns true if string s is lexically not equal to char ch; otherwise returns false.

Definition at line 257 of file qstring.h.

◆ operator!= [4/6]

bool QLatin1String::operator!= ( QLatin1String  s1,
QStringView  s2 
)
friend

Returns true if string s1 is lexically not equal to string view s2; otherwise returns false.

Definition at line 274 of file qstring.h.

◆ operator!= [5/6]

bool QLatin1String::operator!= ( QLatin1String  s1,
QLatin1String  s2 
)
friend

Returns true if string s1 is lexically not equal to string s2; otherwise returns false.

Definition at line 233 of file qstring.h.

◆ operator!= [6/6]

bool QLatin1String::operator!= ( QStringView  s1,
QLatin1String  s2 
)
friend

Returns true if string view s1 is lexically not equal to string s2; otherwise returns false.

Definition at line 266 of file qstring.h.

◆ operator< [1/6]

bool QLatin1String::operator< ( const char *  s1,
QLatin1String  s2 
)
friend

Returns true if const char pointer s1 is lexically less than string s2; otherwise returns false.

Definition at line 298 of file qstring.h.

◆ operator< [2/6]

bool QLatin1String::operator< ( QChar  ch,
QLatin1String  s 
)
friend

Returns true if char ch is lexically less than string s; otherwise returns false.

Definition at line 250 of file qstring.h.

◆ operator< [3/6]

bool QLatin1String::operator< ( QLatin1String  s,
QChar  ch 
)
friend

Returns true if string s is lexically less than char ch; otherwise returns false.

Definition at line 258 of file qstring.h.

◆ operator< [4/6]

bool QLatin1String::operator< ( QLatin1String  s1,
QStringView  s2 
)
friend

Returns true if string s1 is lexically less than string view s2; otherwise returns false.

Definition at line 275 of file qstring.h.

◆ operator< [5/6]

bool QLatin1String::operator< ( QLatin1String  s1,
QLatin1String  s2 
)
friend

Returns true if string s1 is lexically less than string s2; otherwise returns false.

Definition at line 235 of file qstring.h.

◆ operator< [6/6]

bool QLatin1String::operator< ( QStringView  s1,
QLatin1String  s2 
)
friend

Returns true if string view s1 is lexically less than string s2; otherwise returns false.

Definition at line 267 of file qstring.h.

◆ operator<= [1/6]

bool QLatin1String::operator<= ( const char *  s1,
QLatin1String  s2 
)
friend

Returns true if const char pointer s1 is lexically less than or equal to string s2; otherwise returns false.

Definition at line 300 of file qstring.h.

◆ operator<= [2/6]

bool QLatin1String::operator<= ( QChar  ch,
QLatin1String  s 
)
friend

Returns true if char ch is lexically less than or equal to string s; otherwise returns false.

Definition at line 253 of file qstring.h.

◆ operator<= [3/6]

bool QLatin1String::operator<= ( QLatin1String  s,
QChar  ch 
)
friend

Returns true if string s is lexically less than or equal to char ch; otherwise returns false.

Definition at line 260 of file qstring.h.

◆ operator<= [4/6]

bool QLatin1String::operator<= ( QLatin1String  s1,
QStringView  s2 
)
friend

Returns true if string s1 is lexically less than or equal to string view s2; otherwise returns false.

Definition at line 276 of file qstring.h.

◆ operator<= [5/6]

bool QLatin1String::operator<= ( QLatin1String  s1,
QLatin1String  s2 
)
friend

Returns true if string s1 is lexically less than or equal to string s2; otherwise returns false.

Definition at line 243 of file qstring.h.

◆ operator<= [6/6]

bool QLatin1String::operator<= ( QStringView  s1,
QLatin1String  s2 
)
friend

Returns true if string view s1 is lexically less than or equal to string s2; otherwise returns false.

Definition at line 268 of file qstring.h.

◆ operator== [1/6]

bool QLatin1String::operator== ( const char *  s1,
QLatin1String  s2 
)
friend

Returns true if const char pointer s1 is lexically equal to string s2; otherwise returns false.

Definition at line 296 of file qstring.h.

◆ operator== [2/6]

bool QLatin1String::operator== ( QChar  ch,
QLatin1String  s 
)
friend

Returns true if char ch is lexically equal to string s; otherwise returns false.

Definition at line 249 of file qstring.h.

◆ operator== [3/6]

bool QLatin1String::operator== ( QLatin1String  s,
QChar  ch 
)
friend

Returns true if string s is lexically equal to char ch; otherwise returns false.

Definition at line 256 of file qstring.h.

◆ operator== [4/6]

bool QLatin1String::operator== ( QLatin1String  s1,
QStringView  s2 
)
friend

Returns true if string s1 is lexically equal to string view s2; otherwise returns false.

Definition at line 272 of file qstring.h.

◆ operator== [5/6]

bool QLatin1String::operator== ( QLatin1String  s1,
QLatin1String  s2 
)
friend

Returns true if string s1 is lexically equal to string s2; otherwise returns false.

Definition at line 231 of file qstring.h.

◆ operator== [6/6]

bool QLatin1String::operator== ( QStringView  s1,
QLatin1String  s2 
)
friend

Returns true if string view s1 is lexically equal to string s2; otherwise returns false.

Definition at line 264 of file qstring.h.

◆ operator> [1/6]

bool QLatin1String::operator> ( const char *  s1,
QLatin1String  s2 
)
friend

Returns true if const char pointer s1 is lexically greater than string s2; otherwise returns false.

Definition at line 299 of file qstring.h.

◆ operator> [2/6]

bool QLatin1String::operator> ( QChar  ch,
QLatin1String  s 
)
friend

Returns true if char ch is lexically greater than string s; otherwise returns false.

Definition at line 251 of file qstring.h.

◆ operator> [3/6]

bool QLatin1String::operator> ( QLatin1String  s,
QChar  ch 
)
friend

Returns true if string s is lexically greater than char ch; otherwise returns false.

Definition at line 259 of file qstring.h.

◆ operator> [4/6]

bool QLatin1String::operator> ( QLatin1String  s1,
QStringView  s2 
)
friend

Returns true if string s1 is lexically greater than string view s2; otherwise returns false.

Definition at line 277 of file qstring.h.

◆ operator> [5/6]

bool QLatin1String::operator> ( QLatin1String  s1,
QLatin1String  s2 
)
friend

Returns true if string s1 is lexically greater than string s2; otherwise returns false.

Definition at line 241 of file qstring.h.

◆ operator> [6/6]

bool QLatin1String::operator> ( QStringView  s1,
QLatin1String  s2 
)
friend

Returns true if string view s1 is lexically greater than string s2; otherwise returns false.

Definition at line 269 of file qstring.h.

◆ operator>= [1/6]

bool QLatin1String::operator>= ( const char *  s1,
QLatin1String  s2 
)
friend

Returns true if const char pointer s1 is lexically greater than or equal to string s2; otherwise returns false.

Definition at line 301 of file qstring.h.

◆ operator>= [2/6]

bool QLatin1String::operator>= ( QChar  ch,
QLatin1String  s 
)
friend

Returns true if char ch is lexically greater than or equal to string s; otherwise returns false.

Definition at line 254 of file qstring.h.

◆ operator>= [3/6]

bool QLatin1String::operator>= ( QLatin1String  s,
QChar  ch 
)
friend

Returns true if string s is lexically greater than or equal to char ch; otherwise returns false.

Definition at line 261 of file qstring.h.

◆ operator>= [4/6]

bool QLatin1String::operator>= ( QLatin1String  s1,
QStringView  s2 
)
friend

Returns true if string s1 is lexically greater than or equal to string view s2; otherwise returns false.

Definition at line 278 of file qstring.h.

◆ operator>= [5/6]

bool QLatin1String::operator>= ( QLatin1String  s1,
QLatin1String  s2 
)
friend

Returns true if string s1 is lexically greater than or equal to string s2; otherwise returns false.

Definition at line 245 of file qstring.h.

◆ operator>= [6/6]

bool QLatin1String::operator>= ( QStringView  s1,
QLatin1String  s2 
)
friend

Returns true if string view s1 is lexically greater than or equal to string s2; otherwise returns false.

Definition at line 270 of file qstring.h.


The documentation for this class was generated from the following files: