QLatin1StringView Class

QLatin1StringView 클래스는 US-ASCII/Latin-1로 인코딩된 문자열 리터럴을 둘러싼 얇은 래퍼를 제공합니다. 더 보기...

Header: #include <QLatin1StringView>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

이 클래스는 매우 유사합니다.

이 클래스는 char16_t, QChar, QStringView, QUtf8StringView, QString, 및 const char16_t *와 매우 유사합니다.

이 클래스는 const char *, QByteArray, QByteArrayView매우 유사합니다.

바이트 배열 데이터는 utf-8로 해석됩니다.

참고: 이 클래스의 모든 함수는 재진입합니다.

공용 유형

공용 함수

QLatin1StringView()
(since 6.3) QLatin1StringView(QByteArrayView str)
QLatin1StringView(const QByteArray &str)
QLatin1StringView(const char *str)
(since 6.4) QLatin1StringView(std::nullptr_t)
QLatin1StringView(const char *first, const char *last)
QLatin1StringView(const char *str, qsizetype size)
QString arg(Args &&... args) const
QLatin1Char at(qsizetype pos) const
QLatin1Char back() const
QLatin1StringView::const_iterator begin() const
QLatin1StringView::const_iterator cbegin() const
QLatin1StringView::const_iterator cend() const
void chop(qsizetype length)
QLatin1StringView chopped(qsizetype length) const
int compare(QChar ch) const
int compare(QChar ch, Qt::CaseSensitivity cs) const
int compare(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
int compare(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.5) int compare(QUtf8StringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.4) const char *constBegin() const
(since 6.4) const char *constData() const
(since 6.4) const char *constEnd() const
bool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
bool contains(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
bool contains(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.4) qsizetype count(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.4) qsizetype count(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.4) qsizetype count(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
QLatin1StringView::const_reverse_iterator crbegin() const
QLatin1StringView::const_reverse_iterator crend() const
const char *data() const
(since 6.4) bool empty() const
QLatin1StringView::const_iterator end() const
bool endsWith(QChar ch) const
bool endsWith(QChar ch, Qt::CaseSensitivity cs) const
bool endsWith(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
bool endsWith(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.4) QLatin1Char first() const
(since 6.0) QLatin1StringView first(qsizetype n) const
QLatin1Char front() const
qsizetype indexOf(QChar c, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
qsizetype indexOf(QLatin1StringView l1, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
qsizetype indexOf(QStringView str, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
bool isEmpty() const
bool isNull() const
(since 6.4) QLatin1Char last() const
(since 6.0) QLatin1StringView last(qsizetype n) const
qsizetype lastIndexOf(QChar c, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
qsizetype lastIndexOf(QLatin1StringView l1, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
qsizetype lastIndexOf(QStringView str, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.3) qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.2) qsizetype lastIndexOf(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.2) qsizetype lastIndexOf(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
const char *latin1() const
QLatin1StringView left(qsizetype length) const
(since 6.4) qsizetype length() const
(since 6.8) qsizetype max_size() const
QLatin1StringView mid(qsizetype start, qsizetype length = -1) const
QLatin1StringView::const_reverse_iterator rbegin() const
QLatin1StringView::const_reverse_iterator rend() const
QLatin1StringView right(qsizetype length) const
qsizetype size() const
(since 6.8) QLatin1StringView &slice(qsizetype pos)
(since 6.8) QLatin1StringView &slice(qsizetype pos, qsizetype n)
(since 6.0) QLatin1StringView sliced(qsizetype pos) const
(since 6.0) QLatin1StringView sliced(qsizetype pos, qsizetype n) const
bool startsWith(QChar ch) const
bool startsWith(QChar ch, Qt::CaseSensitivity cs) const
bool startsWith(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
bool startsWith(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
(since 6.4) double toDouble(bool *ok = nullptr) const
(since 6.4) float toFloat(bool *ok = nullptr) const
(since 6.4) int toInt(bool *ok = nullptr, int base = 10) const
(since 6.4) long toLong(bool *ok = nullptr, int base = 10) const
(since 6.4) qlonglong toLongLong(bool *ok = nullptr, int base = 10) const
(since 6.4) short toShort(bool *ok = nullptr, int base = 10) const
(since 6.0) QString toString() const
(since 6.4) uint toUInt(bool *ok = nullptr, int base = 10) const
(since 6.4) ulong toULong(bool *ok = nullptr, int base = 10) const
(since 6.4) qulonglong toULongLong(bool *ok = nullptr, int base = 10) const
(since 6.4) ushort toUShort(bool *ok = nullptr, int base = 10) const
(since 6.0) auto tokenize(Needle &&sep, Flags... flags) const
QLatin1StringView trimmed() const
void truncate(qsizetype length)
QLatin1Char operator[](qsizetype pos) const

정적 공용 멤버

(since 6.8) qsizetype maxSize()
bool operator!=(const QChar &lhs, const QLatin1StringView &rhs)
bool operator!=(const QLatin1StringView &lhs, const QChar &rhs)
bool operator!=(const QLatin1StringView &lhs, const QLatin1StringView &rhs)
bool operator!=(const QLatin1StringView &lhs, const QStringView &rhs)
bool operator!=(const QLatin1StringView &lhs, const char *const &rhs)
bool operator!=(const QStringView &lhs, const QLatin1StringView &rhs)
bool operator!=(const char *const &lhs, const QLatin1StringView &rhs)
bool operator!=(const QLatin1StringView &lhs, const QByteArray &rhs)
(since 6.4) QLatin1StringView operator""_L1(const char *str, size_t size)
bool operator<(const QChar &lhs, const QLatin1StringView &rhs)
bool operator<(const QLatin1StringView &lhs, const QChar &rhs)
bool operator<(const QLatin1StringView &lhs, const QLatin1StringView &rhs)
bool operator<(const QLatin1StringView &lhs, const QStringView &rhs)
bool operator<(const QLatin1StringView &lhs, const char *const &rhs)
bool operator<(const QStringView &lhs, const QLatin1StringView &rhs)
bool operator<(const char *const &lhs, const QLatin1StringView &rhs)
bool operator<(const QLatin1StringView &lhs, const QByteArray &rhs)
bool operator<=(const QChar &lhs, const QLatin1StringView &rhs)
bool operator<=(const QLatin1StringView &lhs, const QChar &rhs)
bool operator<=(const QLatin1StringView &lhs, const QLatin1StringView &rhs)
bool operator<=(const QLatin1StringView &lhs, const QStringView &rhs)
bool operator<=(const QLatin1StringView &lhs, const char *const &rhs)
bool operator<=(const QStringView &lhs, const QLatin1StringView &rhs)
bool operator<=(const char *const &lhs, const QLatin1StringView &rhs)
bool operator<=(const QLatin1StringView &lhs, const QByteArray &rhs)
bool operator==(const QChar &lhs, const QLatin1StringView &rhs)
bool operator==(const QLatin1StringView &lhs, const QChar &rhs)
bool operator==(const QLatin1StringView &lhs, const QLatin1StringView &rhs)
bool operator==(const QLatin1StringView &lhs, const QStringView &rhs)
bool operator==(const QLatin1StringView &lhs, const char *const &rhs)
bool operator==(const QStringView &lhs, const QLatin1StringView &rhs)
bool operator==(const char *const &lhs, const QLatin1StringView &rhs)
bool operator==(const QLatin1StringView &lhs, const QByteArray &rhs)
bool operator>(const QChar &lhs, const QLatin1StringView &rhs)
bool operator>(const QLatin1StringView &lhs, const QChar &rhs)
bool operator>(const QLatin1StringView &lhs, const QLatin1StringView &rhs)
bool operator>(const QLatin1StringView &lhs, const QStringView &rhs)
bool operator>(const QLatin1StringView &lhs, const char *const &rhs)
bool operator>(const QStringView &lhs, const QLatin1StringView &rhs)
bool operator>(const char *const &lhs, const QLatin1StringView &rhs)
bool operator>(const QLatin1StringView &lhs, const QByteArray &rhs)
bool operator>=(const QChar &lhs, const QLatin1StringView &rhs)
bool operator>=(const QLatin1StringView &lhs, const QChar &rhs)
bool operator>=(const QLatin1StringView &lhs, const QLatin1StringView &rhs)
bool operator>=(const QLatin1StringView &lhs, const QStringView &rhs)
bool operator>=(const QLatin1StringView &lhs, const char *const &rhs)
bool operator>=(const QStringView &lhs, const QLatin1StringView &rhs)
bool operator>=(const char *const &lhs, const QLatin1StringView &rhs)
bool operator>=(const QLatin1StringView &lhs, const QByteArray &rhs)

상세 설명

QString 의 많은 멤버 함수는 QString 대신 const char * 을 받도록 오버로드되어 있습니다. 여기에는 복사 생성자, 할당 연산자, 비교 연산자 및 insert(), append() 및 prepend()와 같은 다양한 다른 함수가 포함됩니다. 이러한 함수 중 일부는 const char * 데이터에 대해 QString 객체를 생성하지 않도록 최적화되어 있습니다. 예를 들어 strQString,

if (str == "auto" || str == "extern"
        || str == "static" || str == "register") {
    ...
}

if (str == QString("auto") || str == QString("extern")
        || str == QString("static") || str == QString("register")) {
    ...
}

보다 훨씬 빠릅니다. 임시 QString 객체 4개를 생성하지 않고 문자 데이터의 심층 복사본을 만들지 않기 때문입니다.

그러나 const char * 을 취하는 모든 QString 멤버 함수에 해당되는 것은 아니므로 애플리케이션은 다음과 같이 임시 객체가 생성될 것으로 가정해야 합니다.

str.append("Hello ").append("World");

QT_NO_CAST_FROM_ASCII ( QString 문서에 설명된 대로)를 정의하는 애플리케이션은 QStringconst char * API에 액세스할 수 없습니다. 상수 라틴 1 문자열을 효율적으로 지정하는 방법을 제공하기 위해 Qt는 const char * 를 매우 얇게 감싸는 QLatin1StringView 를 제공합니다. QLatin1StringView를 사용하면 위의 예제 코드는 다음과 같이 됩니다.

if (str == "auto"_L1
        || str == "extern"_L1
        || str == "static"_L1
        || str == "register"_L1 {
    ...
}

입력하는 데 시간이 조금 더 걸리지만 첫 번째 버전의 코드와 똑같은 이점을 제공하며 QString::fromLatin1()를 사용하여 Latin-1 문자열을 변환하는 것보다 빠릅니다.

QString(QLatin1StringView) 생성자 덕분에 QString 이 예상되는 모든 곳에서 QLatin1StringView를 사용할 수 있습니다. 예를 들어

QLabel *label = new QLabel("MOD"_L1, this);

참고: QLatin1StringView 인수를 사용하여 호출하는 함수가 실제로 QLatin1StringView를 사용하도록 오버로드되지 않은 경우, QString 로의 암시적 변환은 메모리 할당을 트리거하며, 이는 일반적으로 처음부터 QLatin1StringView를 사용하여 피하고 싶은 것입니다. 이러한 경우 QStringLiteral 을 사용하는 것이 더 나은 옵션일 수 있습니다.

참고: Qt에서 요구하는 대로 소스 코드 파일이 UTF-8로 인코딩된 경우 QLatin1StringView에서는 US-ASCII 리터럴만 사용할 수 있습니다. QLatin1StringView("é") 와 같은 비 US-ASCII 리터럴은 올바르게 표시되지 않습니다. 대신 8진수 또는 16진수 표기법(각각 QLatin1StringView("\351") 또는 QLatin1StringView("\xe9"))을 사용할 수 있습니다.

QString, QLatin1Char, QStringLiteral, QT_NO_CAST_FROM_ASCII도 참조하세요 .

회원 유형 문서

[alias, since 6.7] QLatin1StringView::const_pointer

[alias, since 6.7] QLatin1StringView::pointer

value_type * 의 별칭. STL과의 호환성을 위해 제공됩니다.

이 typedef는 Qt 6.7에서 도입되었습니다.

[alias] QLatin1StringView::const_iterator

iteratorconst_reverse_iterator도 참조하세요 .

[alias] QLatin1StringView::const_reference

reference 의 별칭. STL과의 호환성을 위해 제공됩니다.

[alias] QLatin1StringView::const_reverse_iterator

reverse_iteratorconst_iterator도 참조하세요 .

[alias] QLatin1StringView::difference_type

qsizetype 의 별칭. STL과의 호환성을 위해 제공됩니다.

[alias] QLatin1StringView::iterator

QLatin1StringView 는 변경 가능한 이터레이터를 지원하지 않으므로 const_iterator 와 동일합니다.

const_iteratorreverse_iterator도 참조하세요 .

[alias] QLatin1StringView::reference

value_type & 의 별칭. STL과의 호환성을 위해 제공됩니다.

[alias] QLatin1StringView::reverse_iterator

QLatin1StringView 는 변경 가능한 역이터레이터를 지원하지 않으므로 const_reverse_iterator 와 동일합니다.

const_reverse_iteratoriterator도 참조하세요 .

[alias] QLatin1StringView::size_type

qsizetype 의 별칭. STL과의 호환성을 위해 제공됩니다.

참고: Qt 6 이전 버전에서는 int 의 별칭으로, 64비트 아키텍처에서 QLatin1StringView 에 저장할 수 있는 데이터의 양을 제한했습니다.

[alias] QLatin1StringView::value_type

const char 의 별칭. STL과의 호환성을 위해 제공됩니다.

멤버 함수 문서

[constexpr noexcept] int QLatin1StringView::compare(QChar ch) const

[noexcept] int QLatin1StringView::compare(QChar ch, Qt::CaseSensitivity cs) const

[noexcept] int QLatin1StringView::compare(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] int QLatin1StringView::compare(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

이 문자열 보기를 UTF-16 문자열 보기 str, Latin-1 문자열 보기 l1, 또는 문자 ch 와 각각 비교합니다. 이 문자열이 str, l1 또는 ch 보다 작으면 음의 정수를 반환하고, str, l1 또는 ch 보다 크면 양의 정수를 반환하며, 같으면 0을 반환합니다.

csQt::CaseSensitive (기본값)인 경우 검색은 대소문자를 구분하며, 그렇지 않으면 대소문자를 구분하지 않습니다.

operator==(), operator<() 및 operator>()도 참조하세요 .

[constexpr noexcept] bool QLatin1StringView::startsWith(QChar ch) const

[noexcept] bool QLatin1StringView::startsWith(QChar ch, Qt::CaseSensitivity cs) const

[noexcept] bool QLatin1StringView::startsWith(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] bool QLatin1StringView::startsWith(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

라틴-1 문자열 보기가 각각 str, l1 또는 문자 ch 에서 보는 UTF-16 문자열로 시작하면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

csQt::CaseSensitive (기본값)이면 대소문자를 구분하여 검색하고, 그렇지 않으면 대소문자를 구분하지 않습니다.

endsWith()도 참조하세요 .

[constexpr noexcept] bool QLatin1StringView::endsWith(QChar ch) const

[noexcept] bool QLatin1StringView::endsWith(QChar ch, Qt::CaseSensitivity cs) const

[noexcept] bool QLatin1StringView::endsWith(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] bool QLatin1StringView::endsWith(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

라틴-1 문자열 보기가 각각 str, l1 또는 ch 문자로 표시되는 UTF-16 문자열로 끝나면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

csQt::CaseSensitive (기본값)이면 대소문자를 구분하여 검색하고, 그렇지 않으면 대소문자를 구분하지 않습니다.

startsWith()도 참조하세요 .

[noexcept] qsizetype QLatin1StringView::indexOf(QChar c, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] qsizetype QLatin1StringView::indexOf(QLatin1StringView l1, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] qsizetype QLatin1StringView::indexOf(QStringView str, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

str 에서 보는 라틴-1 문자열, l1 에서 보는 라틴-1 문자열 또는 ch 에서 인덱스 위치 from 에서 앞으로 검색하여 이 라틴-1 문자열 보기에서 첫 번째로 나타나는 UTF-16 문자열의 인덱스 위치를 반환합니다. str , l1 또는 c 를 각각 찾을 수 없으면 -1을 반환합니다.

csQt::CaseSensitive (기본값)이면 대소문자를 구분하여 검색하고, 그렇지 않으면 대소문자를 구분하지 않습니다.

from 가 -1이면 마지막 문자부터 검색이 시작되고, -2이면 그 다음 마지막 문자부터 검색이 시작됩니다.

QString::indexOf()도 참조하세요 .

[noexcept] bool QLatin1StringView::contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] bool QLatin1StringView::contains(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] bool QLatin1StringView::contains(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

이 라틴-1 문자열 보기에 str 에서 보는 UTF-16 문자열, l1 에서 보는 라틴-1 문자열 또는 ch 문자가 각각 포함된 경우 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

csQt::CaseSensitive (기본값)이면 대소문자를 구분하여 검색하고, 그렇지 않으면 대소문자를 구분하지 않습니다.

indexOf(), QStringView::contains(), QStringView::indexOf() 및 QString::indexOf()도 참조하세요 .

[noexcept] qsizetype QLatin1StringView::lastIndexOf(QChar c, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] qsizetype QLatin1StringView::lastIndexOf(QLatin1StringView l1, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept] qsizetype QLatin1StringView::lastIndexOf(QStringView str, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

이 라틴-1 문자열 보기에서 str, l1, 또는 ch 에서 각각 인덱스 위치 from 에서 역순으로 검색하여 마지막으로 나타나는 UTF-16 문자열의 인덱스 위치를 반환하고, str, l1 또는 ch 을 찾을 수 없으면 각각 -1을 반환합니다.

from 가 -1이면 마지막 문자부터 검색이 시작되고, -2이면 그 다음 마지막 문자부터 검색이 시작됩니다.

csQt::CaseSensitive (기본값)인 경우 대소문자를 구분하여 검색하고, 그렇지 않은 경우 대소문자를 구분하지 않습니다.

참고: 길이가 0인 str 또는 l1 을 검색할 때 데이터 끝의 일치 항목이 음수 from 인 경우 일반적으로 -1 은 문자열 끝에서 검색하는 것으로 간주되지만, 끝의 일치 항목은 마지막 문자 뒤에 있으므로 검색에서 제외됩니다. 이러한 마지막 빈 일치 항목을 포함하려면 from 에 양수 값을 지정하거나 from 매개변수를 완전히 생략하세요.

indexOf(), QStringView::lastIndexOf(), QStringView::indexOf() 및 QString::indexOf()도 참조하세요 .

[noexcept, since 6.2] qsizetype QLatin1StringView::lastIndexOf(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[noexcept, since 6.2] qsizetype QLatin1StringView::lastIndexOf(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

이 함수는 lastIndexOf()를 오버로드합니다.

str 또는 l1 에서 본 라틴-1 문자열의 마지막에 나타나는 UTF-16 문자열의 이 라틴-1 문자열 보기에서 인덱스 위치를 각각 반환합니다. str 또는 l1 을 찾을 수 없으면 각각 -1을 반환합니다.

csQt::CaseSensitive (기본값)인 경우 대소문자를 구분하여 검색하고, 그렇지 않은 경우 대소문자를 구분하지 않습니다.

이 함수는 Qt 6.2에 도입되었습니다.

[noexcept, since 6.4] qsizetype QLatin1StringView::count(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[since 6.4] qsizetype QLatin1StringView::count(QLatin1StringView l1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

[since 6.4] qsizetype QLatin1StringView::count(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

이 문자열 보기에서 str 에서 보는 UTF-16 문자열, l1 에서 보는 Latin-1 문자열 또는 ch 문자의 (중복될 가능성이 있는) 발생 횟수를 각각 반환합니다.

csQt::CaseSensitive (기본값)인 경우 검색은 대소문자를 구분하고, 그렇지 않은 경우 대소문자를 구분하지 않습니다.

이 함수는 Qt 6.4에 도입되었습니다.

contains() 및 indexOf()도 참조하세요 .

[since 6.4] int QLatin1StringView::toInt(bool *ok = nullptr, int base = 10) const

[since 6.4] long QLatin1StringView::toLong(bool *ok = nullptr, int base = 10) const

[since 6.4] qlonglong QLatin1StringView::toLongLong(bool *ok = nullptr, int base = 10) const

[since 6.4] qulonglong QLatin1StringView::toULongLong(bool *ok = nullptr, int base = 10) const

[since 6.4] short QLatin1StringView::toShort(bool *ok = nullptr, int base = 10) const

[since 6.4] uint QLatin1StringView::toUInt(bool *ok = nullptr, int base = 10) const

[since 6.4] ulong QLatin1StringView::toULong(bool *ok = nullptr, int base = 10) const

[since 6.4] ushort QLatin1StringView::toUShort(bool *ok = nullptr, int base = 10) const

기본값은 10인 기저값 base 을 사용하여 해당 숫자 값으로 변환한 QLatin1StringView 을 반환합니다. 기저 0과 2~36이 지원되며, 9를 초과하는 숫자는 문자를 사용합니다(A는 10, B는 11 등).

base 이 0인 경우 라틴 1 문자열 보기가 다음과 같은 규칙(순서대로)을 사용하여 기저가 자동으로 결정됩니다:

  • "0x"로 시작하면 나머지는 16진수(기저 16)로 읽습니다.
  • "0b"로 시작하면 나머지는 2진수(베이스 2)로 읽습니다.
  • "0"로 시작하면 나머지는 8진수(베이스 8)로 읽습니다.
  • 그렇지 않으면 10진수로 읽습니다.

변환에 실패하면 0을 반환합니다.

oknullptr 이 아닌 경우 실패는 *okfalse 로 설정하여 보고하고 성공은 *oktrue 로 설정하여 보고합니다.

참고: 숫자 변환은 사용자의 로캘에 관계없이 기본 C 로캘에서 수행됩니다. QLocale 을 사용하여 숫자와 문자열 간의 로캘 인식 변환을 수행하세요.

이 함수는 선행 및 후행 공백 문자를 무시합니다.

참고: "0b" 접두사에 대한 지원은 Qt 6.4에서 추가되었습니다.

이 함수는 Qt 6.4에서 도입되었습니다.

[since 6.4] double QLatin1StringView::toDouble(bool *ok = nullptr) const

[since 6.4] float QLatin1StringView::toFloat(bool *ok = nullptr) const

해당 부동소수점 값으로 변환된 QLatin1StringView 을 반환합니다.

변환이 오버플로되면 무한대를 반환하고, 다른 이유(예: 언더플로)로 변환에 실패하면 0.0을 반환합니다.

oknullptr 이 아닌 경우 실패는 *okfalse 로 설정하여 보고하고 성공은 *oktrue 로 설정하여 보고합니다.

경고: QLatin1StringView 콘텐츠에는 더하기/빼기 기호, 과학적 표기법에 사용되는 문자 e, 소수점 이하를 포함한 유효한 숫자 문자만 포함할 수 있습니다. 단위 또는 추가 문자를 포함하면 변환 오류가 발생합니다.

참고: 숫자 변환은 사용자의 로캘에 관계없이 기본 C 로캘에서 수행됩니다. 숫자와 문자열 간의 로캘 인식 변환을 수행하려면 QLocale 을 사용하세요.

이 함수는 선행 및 후행 공백 문자를 무시합니다.

이 함수는 Qt 6.4에 도입되었습니다.

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

이 문자열에서 %N 의 발생을 args 의 해당 인수로 대체합니다. 인수는 위치가 아닙니다: args 의 첫 번째는 %N 을 가장 낮은 N (모두), args 의 두 번째는 %N 을 다음으로 낮은 N 등으로 대체합니다.

ArgsQString, QStringView 또는 QLatin1StringView 로 암시적으로 변환되는 모든 것으로 구성될 수 있습니다.

또한 다음 유형도 지원됩니다: QChar, QLatin1Char.

QString::arg()도 참조하세요 .

[constexpr noexcept(...), since 6.0] template <typename Needle, typename... Flags> auto QLatin1StringView::tokenize(Needle &&sep, Flags... flags) const

sep 이 발생할 때마다 문자열을 하위 문자열 보기로 분할하고 해당 문자열의 지연 시퀀스를 반환합니다.

와 동일합니다.

return QStringTokenizer{std::forward<Needle>(sep), flags...};

와 동일하지만 컴파일러에서 C++17 클래스 템플릿 인수 공제(CTAD)를 활성화하지 않아도 작동합니다.

sepflags 이 어떻게 상호 작용하여 결과를 형성하는지는 QStringTokenizer 을 참조하세요.

참고: 이 함수는 QStringTokenizer 을 반환하지만 템플릿 인수의 이름을 명시적으로 지정해서는 절대 안 됩니다. C++17 클래스 템플릿 인수 공제(CTAD)를 사용할 수 있는 경우, 템플릿 인수 없이

QStringTokenizer result = sv.tokenize(sep);

(템플릿 인자 없이)를 작성할 수 있습니다. C++17 CTAD를 사용할 수 없는 경우 반환값을 auto 변수에만 저장해야 합니다:

auto result = sv.tokenize(sep);

이는 QStringTokenizer 의 템플릿 인수가 반환되는 특정 tokenize() 오버로드에 매우 미묘한 종속성을 가지며 일반적으로 구분 기호에 사용되는 유형과 일치하지 않기 때문입니다.

이 함수는 Qt 6.0에 도입되었습니다.

참고: 이 함수는 noexcept(qTokenize(std::declval<const QLatin1StringView &>(), std::forward<Needle>(needle), flags...))true 일 때를 제외하고는 사용되지 않습니다.

QStringTokenizerqTokenize()도 참조하십시오 .

[constexpr noexcept] QLatin1StringView::QLatin1StringView()

nullptr 를 저장하는 QLatin1StringView 객체를 구축합니다.

data(), isEmpty(), isNull() 및 Distinction Between Null and Empty Strings도 참조하십시오 .

[explicit constexpr noexcept, since 6.3] QLatin1StringView::QLatin1StringView(QByteArrayView str)

QLatin1StringView 객체를 str 에 뷰로 구성합니다.

문자열 데이터는 복사되지 않습니다. 호출자는 str 이 가리키는 데이터가 QLatin1StringView 객체가 존재하는 한 삭제되거나 수정되지 않는다는 것을 보장할 수 있어야 합니다. 이 크기는 널 종결자를 확인하지 않고 str 에서 있는 그대로 가져옵니다.

참고: : 바이트 배열의 모든 널('\0') 바이트는 이 문자열에 포함되며, 이 문자열이 QString 에서 사용되는 경우 유니코드 널 문자(U+0000)로 변환됩니다.

이 함수는 Qt 6.3에 도입되었습니다.

latin1()도 참조하십시오 .

[explicit noexcept] QLatin1StringView::QLatin1StringView(const QByteArray &str)

QLatin1StringView 객체를 str 에 뷰로 구성합니다.

문자열 데이터는 복사되지 않습니다. 호출자는 QLatin1StringView 객체가 존재하는 한 str 이 삭제되거나 수정되지 않음을 보장할 수 있어야 합니다.

latin1()도 참조하십시오 .

[explicit constexpr noexcept] QLatin1StringView::QLatin1StringView(const char *str)

str 을 저장하는 QLatin1StringView 객체를 구축합니다.

문자열 데이터는 복사되지 않습니다. 호출자는 QLatin1StringView 객체가 존재하는 한 str 이 삭제되거나 수정되지 않음을 보장할 수 있어야 합니다.

latin1()도 참조하십시오 .

[constexpr noexcept, since 6.4] QLatin1StringView::QLatin1StringView(std::nullptr_t)

nullptr 를 저장하는 QLatin1StringView 객체를 구축합니다.

이 함수는 Qt 6.4에 도입되었습니다.

data(), isEmpty(), isNull() 및 Distinction Between Null and Empty Strings도 참조하십시오 .

[constexpr] QLatin1StringView::QLatin1StringView(const char *first, const char *last)

길이 (last - first)로 first 을 저장하는 QLatin1StringView 객체를 구축합니다.

[first,last) 범위는 이 Latin-1 문자열 객체의 수명 동안 유효해야 합니다.

lastnullptr 인 경우 nullptrfirst 로 전달해도 안전하며, null Latin-1 문자열이 생성됩니다.

lastfirst 앞에 오거나 firstnullptr 이고 last 가 아닌 경우 또는 last - first > INT_MAX 인 경우에는 동작이 정의되지 않습니다.

[constexpr noexcept] QLatin1StringView::QLatin1StringView(const char *str, qsizetype size)

size 으로 str 을 저장하는 QLatin1StringView 객체를 구축합니다.

문자열 데이터는 복사되지 않습니다. 호출자는 QLatin1StringView 객체가 존재하는 한 str 이 삭제되거나 수정되지 않음을 보장할 수 있어야 합니다.

참고: : 바이트 배열의 모든 널('\0') 바이트는 이 문자열에 포함되며, 이 문자열이 QString 에서 사용되는 경우 유니코드 널 문자(U+0000)로 변환됩니다. 이 동작은 Qt 5.x와 다릅니다.

latin1()도 참조하십시오 .

[constexpr] QLatin1Char QLatin1StringView::at(qsizetype pos) const

이 객체에서 pos 위치에 있는 문자를 반환합니다.

참고: 이 함수는 오류 검사를 수행하지 않습니다. pos < 0 또는 pos >= size()인 경우 동작이 정의되지 않습니다.

operator[]()도 참조하세요 .

[constexpr] QLatin1Char QLatin1StringView::back() const

문자열의 마지막 문자를 반환합니다. at(size() - 1) 와 동일합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

경고: 빈 문자열에서 이 함수를 호출하면 정의되지 않은 동작이 발생합니다.

front(), at() 및 operator[]()도 참조하세요 .

[constexpr noexcept] QLatin1StringView::const_iterator QLatin1StringView::begin() const

문자열의 첫 번째 문자를 가리키는 상수 STL 스타일 이터레이터를 반환합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

end(), cbegin(), rbegin() 및 data()도 참조하세요 .

[constexpr noexcept] QLatin1StringView::const_iterator QLatin1StringView::cbegin() const

begin()와 동일합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

cend(), begin(), crbegin() 및 data()도 참조하세요 .

[constexpr noexcept] QLatin1StringView::const_iterator QLatin1StringView::cend() const

end()와 동일합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

cbegin(), end() 및 crend()도 참조하세요 .

[constexpr] void QLatin1StringView::chop(qsizetype length)

이 문자열을 length 문자만큼 잘라냅니다.

*this = left(size() - length) 와 동일합니다.

참고: length < 0 또는 length > size()인 경우 동작이 정의되지 않습니다.

sliced(), first(), last(), chopped(), truncate() 및 slice()도 참조하세요 .

[constexpr] QLatin1StringView QLatin1StringView::chopped(qsizetype length) const

이 객체의 시작 부분부터 시작되는 길이 size() - length 의 부분 문자열을 반환합니다.

left(size() - length) 와 동일합니다.

참고: length < 0 또는 length > size()인 경우 동작이 정의되지 않습니다.

sliced(), first(), last(), chop(), truncate() 및 slice()도 참조하세요 .

[noexcept, since 6.5] int QLatin1StringView::compare(QUtf8StringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

이 문자열 보기를 str 와 비교하여 이 문자열 보기가 str 보다 작으면 음의 정수를, str 보다 크면 양의 정수를, 같으면 0을 반환합니다.

csQt::CaseSensitive (기본값)인 경우 비교는 대소문자를 구분하고, 그렇지 않은 경우 대소문자를 구분하지 않습니다.

이 함수는 Qt 6.5에 도입되었습니다.

operator==(), operator<() 및 operator>()도 참조하십시오 .

[constexpr noexcept, since 6.4] const char *QLatin1StringView::constBegin() const

begin()와 동일합니다.

이 함수는 다른 Qt 컨테이너와의 호환성을 위해 제공됩니다.

이 함수는 Qt 6.4에 도입되었습니다.

constEnd(), begin(), cbegin() 및 data()도 참조하십시오 .

[constexpr noexcept, since 6.4] const char *QLatin1StringView::constData() const

이 객체가 참조하는 라틴-1 문자열의 시작 부분을 반환합니다.

이 함수는 다른 Qt 컨테이너와의 호환성을 위해 제공됩니다.

이 함수는 Qt 6.4에 도입되었습니다.

data()도 참조하십시오 .

[constexpr noexcept, since 6.4] const char *QLatin1StringView::constEnd() const

end()와 동일합니다.

이 함수는 다른 Qt 컨테이너와의 호환성을 위해 제공됩니다.

이 함수는 Qt 6.4에 도입되었습니다.

constBegin(), end(), cend() 및 crend()도 참조하십시오 .

[noexcept] QLatin1StringView::const_reverse_iterator QLatin1StringView::crbegin() const

rbegin()와 동일합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

crend(), rbegin() 및 cbegin()도 참조하세요 .

[noexcept] QLatin1StringView::const_reverse_iterator QLatin1StringView::crend() const

rend()와 동일합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

crbegin(), rend() 및 cend()도 참조하세요 .

[constexpr noexcept] const char *QLatin1StringView::data() const

이 객체가 참조하는 라틴-1 문자열의 시작 부분을 반환합니다.

[constexpr noexcept, since 6.4] bool QLatin1StringView::empty() const

이 객체가 참조하는 Latin-1 문자열이 비어 있는지(size() == 0) 여부를 반환합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

이 함수는 Qt 6.4에 도입되었습니다.

isEmpty(), isNull() 및 size()도 참조하십시오 .

[constexpr noexcept] QLatin1StringView::const_iterator QLatin1StringView::end() const

문자열의 마지막 문자 바로 뒤를 가리키는 상수 STL 스타일 이터레이터를 반환합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

begin(), cend() 및 rend()도 참조하세요 .

[constexpr, since 6.4] QLatin1Char QLatin1StringView::first() const

문자열의 첫 번째 문자를 반환합니다. at(0) 또는 front()와 동일합니다.

이 함수는 다른 Qt 컨테이너와의 호환성을 위해 제공됩니다.

경고: 빈 문자열에서 이 함수를 호출하면 정의되지 않은 동작이 발생합니다.

이 함수는 Qt 6.4에 도입되었습니다.

last(), front() 및 back()도 참조하십시오 .

[constexpr, since 6.0] QLatin1StringView QLatin1StringView::first(qsizetype n) const

이 문자열 보기의 첫 번째 n 문자가 포함된 라틴-1 문자열 보기를 반환합니다.

참고: n < 0 또는 n > size()인 경우 동작이 정의되지 않습니다.

이 함수는 Qt 6.0에 도입되었습니다.

last(), startsWith(), chopped(), chop(), truncate() 및 slice()도 참조하십시오 .

[constexpr] QLatin1Char QLatin1StringView::front() const

문자열의 첫 번째 문자를 반환합니다. at(0) 와 동일합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

경고: 빈 문자열에서 이 함수를 호출하면 정의되지 않은 동작이 발생합니다.

back(), at() 및 operator[]()도 참조하세요 .

[constexpr noexcept] bool QLatin1StringView::isEmpty() const

이 객체가 참조하는 Latin-1 문자열이 비어 있는지(size() == 0) 여부를 반환합니다.

isNull() 및 size()도 참조하세요 .

[constexpr noexcept] bool QLatin1StringView::isNull() const

이 객체가 참조하는 Latin-1 문자열이 null(data() == nullptr)인지 여부를 반환합니다.

isEmpty() 및 data()도 참조하세요 .

[constexpr, since 6.4] QLatin1Char QLatin1StringView::last() const

문자열의 마지막 문자를 반환합니다. at(size() - 1) 또는 back()와 동일합니다.

이 함수는 다른 Qt 컨테이너와의 호환성을 위해 제공됩니다.

경고: 빈 문자열에서 이 함수를 호출하면 정의되지 않은 동작이 발생합니다.

이 함수는 Qt 6.4에 도입되었습니다.

first(), back() 및 front()도 참조하십시오 .

[constexpr, since 6.0] QLatin1StringView QLatin1StringView::last(qsizetype n) const

이 문자열 보기의 마지막 n 문자가 포함된 라틴-1 문자열 보기를 반환합니다.

참고: n < 0 또는 n > size()인 경우 동작이 정의되지 않습니다.

이 함수는 Qt 6.0에 도입되었습니다.

first(), endsWith(), chopped(), chop(), truncate() 및 slice()도 참조하십시오 .

[noexcept, since 6.3] qsizetype QLatin1StringView::lastIndexOf(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

이 함수는 오버로드된 함수입니다.

이 함수는 Qt 6.3에 도입되었습니다.

[constexpr noexcept] const char *QLatin1StringView::latin1() const

이 객체가 참조하는 라틴-1 문자열의 시작 부분을 반환합니다.

[constexpr] QLatin1StringView QLatin1StringView::left(qsizetype length) const

length 이 범위를 벗어날 수 없다는 것을 알고 있다면 새 코드에서 first()을 대신 사용하는 것이 더 빠릅니다.

이 Latin-1 문자열 보기에서 0번 위치부터 시작하는 length 길이의 부분 문자열을 반환합니다.

lengthsize()보다 크거나 같거나 0보다 작으면 전체 Latin-1 문자열 보기가 반환됩니다.

first(), last(), sliced(), startsWith(), chopped(), chop(), truncate() 및 slice()도 참조하세요 .

[constexpr noexcept, since 6.4] qsizetype QLatin1StringView::length() const

size()와 동일합니다.

이 함수는 다른 Qt 컨테이너와의 호환성을 위해 제공됩니다.

이 함수는 Qt 6.4에 도입되었습니다.

[static constexpr noexcept, since 6.8] qsizetype QLatin1StringView::maxSize()

문자열 뷰가 이론적으로 표현할 수 있는 최대 요소 수를 반환합니다. 실제로는 시스템에서 사용할 수 있는 메모리의 양에 따라 이보다 훨씬 적을 수 있습니다.

이 함수는 Qt 6.8에 도입되었습니다.

[constexpr noexcept, since 6.8] qsizetype QLatin1StringView::max_size() const

이 함수는 STL 호환성을 위해 제공됩니다.

maxSize()를 반환합니다.

이 함수는 Qt 6.8에 도입되었습니다.

[constexpr] QLatin1StringView QLatin1StringView::mid(qsizetype start, qsizetype length = -1) const

이 라틴 1 문자열 보기에서 start 위치에서 시작하는 길이 length 의 부분 문자열을 반환합니다.

startlength 이 범위를 벗어날 수 없다는 것을 알고 있다면 새 코드에서 sliced()를 대신 사용하는 것이 더 빠릅니다.

start 이 이 문자열 보기의 길이를 초과하는 경우 빈 Latin-1 문자열 보기를 반환합니다. start 에서 시작하는 이 문자열 보기에서 사용 가능한 문자가 length 미만인 경우 또는 length 이 음수(기본값)인 경우 이 함수는 start 에서 사용 가능한 모든 문자를 반환합니다.

first(), last(), sliced(), chopped(), chop(), truncate() 및 slice()도 참조하세요 .

[noexcept] QLatin1StringView::const_reverse_iterator QLatin1StringView::rbegin() const

문자열의 첫 번째 문자를 역순으로 가리키는 상수 STL 스타일 역이터레이터를 반환합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

rend(), crbegin() 및 begin()도 참조하세요 .

[noexcept] QLatin1StringView::const_reverse_iterator QLatin1StringView::rend() const

문자열의 마지막 문자 바로 뒤를 가리키는 STL 스타일의 역방향 반복자를 역순으로 반환합니다.

이 함수는 STL 호환성을 위해 제공됩니다.

rbegin(), crend() 및 end()도 참조하세요 .

length 이 범위를 벗어날 수 없다는 것을 알고 있다면 새 코드에서 last()을 사용하는 것이 더 빠르므로 대신 사용하세요.

이 Latin-1 문자열 보기에서 size() - length 위치부터 시작되는 length 길이의 부분 문자열을 반환합니다.

lengthsize() 보다 크거나 같거나 0보다 작으면 전체 Latin-1 문자열 보기가 반환됩니다.

first(), last(), sliced(), endsWith(), chopped(), chop(), truncate() 및 slice()도 참조하세요 .

[constexpr noexcept] qsizetype QLatin1StringView::size() const

이 객체가 참조하는 라틴-1 문자열의 크기를 반환합니다.

참고: Qt 6 이전 버전에서 이 함수는 int 를 반환하여 64비트 아키텍처에서 QLatin1StringView 에 담을 수 있는 데이터의 양을 제한했습니다.

[constexpr, since 6.8] QLatin1StringView &QLatin1StringView::slice(qsizetype pos)

이 라틴 1 문자열 보기를 pos 위치에서 시작하여 끝까지 확장되도록 수정합니다.

참고: pos < 0 또는 pos > size()인 경우 동작이 정의되지 않습니다.

이 함수는 Qt 6.8에 도입되었습니다.

sliced(), first(), last(), chopped(), chop() 및 truncate()도 참조하십시오 .

[constexpr, since 6.8] QLatin1StringView &QLatin1StringView::slice(qsizetype pos, qsizetype n)

이 함수는 오버로드된 함수입니다.

이 라틴 1 문자열 보기가 pos 위치에서 시작하여 n 문자로 확장되도록 수정합니다.

참고: pos < 0, n < 0 또는 pos + n > size() 일 때는 동작이 정의되지 않습니다.

이 함수는 Qt 6.8에 도입되었습니다.

sliced(), first(), last(), chopped(), chop() 및 truncate()도 참조하십시오 .

[constexpr, since 6.0] QLatin1StringView QLatin1StringView::sliced(qsizetype pos) const

이 문자열 보기의 pos 위치에서 시작하여 끝 부분까지 확장되는 라틴-1 문자열 보기를 반환합니다.

참고: pos < 0 또는 pos > size()인 경우 동작이 정의되지 않습니다.

이 함수는 Qt 6.0에 도입되었습니다.

first(), last(), chopped(), chop(), truncate() 및 slice()도 참조하십시오 .

[constexpr, since 6.0] QLatin1StringView QLatin1StringView::sliced(qsizetype pos, qsizetype n) const

위치 pos 에서 시작하여 이 문자열 보기의 n 문자를 가리키는 라틴-1 문자열 보기를 반환합니다.

참고: pos < 0, n < 0 또는 pos + n > size() 일 때는 동작이 정의되지 않습니다.

이 함수는 Qt 6.0에 도입되었습니다.

first(), last(), chopped(), chop(), truncate() 및 slice()도 참조하십시오 .

[since 6.0] QString QLatin1StringView::toString() const

이 라틴 1 문자열을 QString 로 변환합니다. 다음과 같습니다.

return QString(*this);

이 함수는 Qt 6.0에 도입되었습니다.

[noexcept] QLatin1StringView QLatin1StringView::trimmed() const

선행 및 후행 공백을 제거하고 결과를 반환합니다.

공백은 QChar::isSpace()가 true 을 반환하는 모든 문자를 의미합니다. 여기에는 ASCII 문자 '\t', '\n', '\v', '\f', '\r', ' ' 등이 포함됩니다.

[constexpr] void QLatin1StringView::truncate(qsizetype length)

이 문자열을 길이에 맞게 잘라냅니다 length.

*this = left(length) 와 동일합니다.

참고: length < 0 또는 length > size()인 경우 동작이 정의되지 않습니다.

sliced(), first(), last(), chopped() 및 chop()도 참조하세요 .

[constexpr] QLatin1Char QLatin1StringView::operator[](qsizetype pos) const

이 객체에서 pos 위치에 있는 문자를 반환합니다.

참고: 이 함수는 오류 검사를 수행하지 않습니다. pos < 0 또는 pos >= size()인 경우 동작이 정의되지 않습니다.

at()도 참조하세요 .

관련 비회원

[noexcept] bool operator!=(const QChar &lhs, const QLatin1StringView &rhs)

문자 lhs 가 문자열 rhs 과 어휘적으로 같지 않으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator!=(const QLatin1StringView &lhs, const QChar &rhs)

문자열 lhs 이 문자 rhs 와 어휘적으로 같지 않으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator!=(const QLatin1StringView &lhs, const QLatin1StringView &rhs)

문자열 lhs 이 문자열 rhs 과 어휘적으로 같지 않으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator!=(const QLatin1StringView &lhs, const QStringView &rhs)

lhs 문자열이 rhs 문자열 보기와 어휘적으로 같지 않으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator!=(const QLatin1StringView &lhs, const char *const &rhs)

lhs 문자열이 const char 포인터 rhs 와 같지 않으면 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.

rhs const char 포인터는 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 통과하도록 하려는 경우 유용할 수 있습니다.

Comparing Strings참조하세요 .

[noexcept] bool operator!=(const QStringView &lhs, const QLatin1StringView &rhs)

문자열 보기 lhs 가 어휘적으로 문자열 rhs 과 같지 않으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator!=(const char *const &lhs, const QLatin1StringView &rhs)

정적 문자 포인터 lhs 가 문자열 rhs 과 어휘적으로 같지 않으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator!=(const QLatin1StringView &lhs, const QByteArray &rhs)

이 함수는 연산자!=()를 오버로드합니다.

rhs 바이트 배열은 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 거치도록 하려는 경우 유용할 수 있습니다.

[constexpr noexcept, since 6.4] QLatin1StringView operator""_L1(const char *str, size_t size)

문자 문자열 리터럴 str 의 첫 번째 size 문자로 QLatin1StringView 을 생성하는 리터럴 연산자입니다.

다음 코드는 QLatin1StringView 를 생성합니다:

using namespace Qt::Literals::StringLiterals;

auto str = "hello"_L1;

이 함수는 Qt 6.4에 도입되었습니다.

Qt::Literals::StringLiterals참조하십시오 .

[noexcept] bool operator<(const QChar &lhs, const QLatin1StringView &rhs)

문자 lhs 가 문자열 rhs 보다 어휘적으로 작으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<(const QLatin1StringView &lhs, const QChar &rhs)

문자열 lhs 이 문자 rhs 보다 어휘적으로 작으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<(const QLatin1StringView &lhs, const QLatin1StringView &rhs)

문자열 lhs 이 문자열 rhs 보다 어휘적으로 작으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<(const QLatin1StringView &lhs, const QStringView &rhs)

문자열 lhs 이 문자열 보기 rhs 보다 어휘적으로 작으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<(const QLatin1StringView &lhs, const char *const &rhs)

lhs 문자열이 const char 포인터 rhs 보다 어휘적으로 작으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

rhs const char 포인터는 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 통과하도록 하려는 경우 유용할 수 있습니다.

Comparing Strings참조하세요 .

[noexcept] bool operator<(const QStringView &lhs, const QLatin1StringView &rhs)

문자열 보기 lhs 가 문자열 rhs 보다 어휘적으로 작으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<(const char *const &lhs, const QLatin1StringView &rhs)

정수 문자 포인터 lhs 가 문자열 rhs 보다 어휘적으로 작으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<(const QLatin1StringView &lhs, const QByteArray &rhs)

이 함수는 오버로드된 함수입니다.

rhs 바이트 배열은 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 거치도록 하려는 경우 유용할 수 있습니다.

[noexcept] bool operator<=(const QChar &lhs, const QLatin1StringView &rhs)

문자 lhs 가 문자열 rhs 보다 어휘적으로 작거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<=(const QLatin1StringView &lhs, const QChar &rhs)

문자열 lhs 이 어휘적으로 문자 rhs 보다 작거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<=(const QLatin1StringView &lhs, const QLatin1StringView &rhs)

문자열 lhs 이 어휘적으로 문자열 rhs 보다 작거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<=(const QLatin1StringView &lhs, const QStringView &rhs)

문자열 lhs 이 문자열 보기 rhs 보다 어휘적으로 작거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<=(const QLatin1StringView &lhs, const char *const &rhs)

lhs 문자열이 const char 포인터 rhs 보다 어휘적으로 작거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

rhs const char 포인터는 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 통과하도록 하려는 경우 유용할 수 있습니다.

Comparing Strings참조하세요 .

[noexcept] bool operator<=(const QStringView &lhs, const QLatin1StringView &rhs)

문자열 보기 lhs 가 어휘적으로 문자열 rhs 보다 작거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<=(const char *const &lhs, const QLatin1StringView &rhs)

const char 포인터 lhs 가 문자열 rhs 보다 어휘적으로 작거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator<=(const QLatin1StringView &lhs, const QByteArray &rhs)

이 함수는 오버로드된 함수입니다.

rhs 바이트 배열은 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 거치도록 하려는 경우 유용할 수 있습니다.

[noexcept] bool operator==(const QChar &lhs, const QLatin1StringView &rhs)

문자 lhs 가 문자열 rhs 과 어휘적으로 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator==(const QLatin1StringView &lhs, const QChar &rhs)

문자열 lhs 이 문자 rhs 와 어휘적으로 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator==(const QLatin1StringView &lhs, const QLatin1StringView &rhs)

문자열 lhs 이 문자열 rhs 과 어휘적으로 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator==(const QLatin1StringView &lhs, const QStringView &rhs)

문자열 lhs 이 문자열 보기 rhs 와 어휘적으로 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator==(const QLatin1StringView &lhs, const char *const &rhs)

lhs 문자열이 const char 포인터 rhs 와 같으면 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.

rhs const char 포인터는 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 거치도록 하려는 경우 유용할 수 있습니다.

Comparing Strings참조하세요 .

[noexcept] bool operator==(const QStringView &lhs, const QLatin1StringView &rhs)

문자열 보기 lhs 가 문자열 rhs 과 어휘적으로 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator==(const char *const &lhs, const QLatin1StringView &rhs)

const char 포인터 lhs 가 문자열 rhs 과 어휘적으로 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator==(const QLatin1StringView &lhs, const QByteArray &rhs)

이 함수는 오버로드된 함수입니다.

rhs 바이트 배열은 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 거치도록 하려는 경우 유용할 수 있습니다.

[noexcept] bool operator>(const QChar &lhs, const QLatin1StringView &rhs)

문자 lhs 가 문자열 rhs 보다 어휘적으로 큰 경우 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.

[noexcept] bool operator>(const QLatin1StringView &lhs, const QChar &rhs)

문자열 lhs 이 문자 rhs 보다 어휘적으로 크면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>(const QLatin1StringView &lhs, const QLatin1StringView &rhs)

문자열 lhs 이 문자열 rhs 보다 어휘적으로 크면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>(const QLatin1StringView &lhs, const QStringView &rhs)

문자열 lhs 이 문자열 보기 rhs 보다 어휘적으로 크면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>(const QLatin1StringView &lhs, const char *const &rhs)

lhs 문자열이 const char 포인터 rhs 보다 어휘적으로 크면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

rhs const char 포인터는 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 통과하도록 하려는 경우 유용할 수 있습니다.

Comparing Strings참조하세요 .

[noexcept] bool operator>(const QStringView &lhs, const QLatin1StringView &rhs)

문자열 보기 lhs 가 문자열 rhs 보다 어휘적으로 큰 경우 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.

[noexcept] bool operator>(const char *const &lhs, const QLatin1StringView &rhs)

정수 문자 포인터 lhs 가 문자열 rhs 보다 어휘적으로 크면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>(const QLatin1StringView &lhs, const QByteArray &rhs)

이 함수는 오버로드된 함수입니다.

rhs 바이트 배열은 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 거치도록 하려는 경우 유용할 수 있습니다.

[noexcept] bool operator>=(const QChar &lhs, const QLatin1StringView &rhs)

문자 lhs 가 문자열 rhs 보다 어휘적으로 크거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>=(const QLatin1StringView &lhs, const QChar &rhs)

문자열 lhs 이 어휘적으로 문자 rhs 보다 크거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>=(const QLatin1StringView &lhs, const QLatin1StringView &rhs)

문자열 lhs 이 어휘적으로 문자열 rhs 보다 크거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>=(const QLatin1StringView &lhs, const QStringView &rhs)

문자열 lhs 이 어휘적으로 보기 rhs 보다 크거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>=(const QLatin1StringView &lhs, const char *const &rhs)

lhs 문자열이 const char 포인터 rhs 보다 어휘적으로 크거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

rhs const char 포인터는 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 통과하도록 하려는 경우 유용할 수 있습니다.

Comparing Strings참조하세요 .

[noexcept] bool operator>=(const QStringView &lhs, const QLatin1StringView &rhs)

문자열 보기 lhs 가 어휘적으로 문자열 rhs 보다 크거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>=(const char *const &lhs, const QLatin1StringView &rhs)

const char 포인터 lhs 가 어휘적으로 문자열 rhs 보다 크거나 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator>=(const QLatin1StringView &lhs, const QByteArray &rhs)

이 함수는 오버로드된 함수입니다.

rhs 바이트 배열은 QUtf8StringView 로 변환됩니다.

애플리케이션을 컴파일할 때 QT_NO_CAST_FROM_ASCII 을 정의하여 이 연산자를 비활성화할 수 있습니다. 예를 들어 사용자가 볼 수 있는 모든 문자열이 QObject::tr()를 거치도록 하려는 경우 유용할 수 있습니다.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.