1// Copyright (C) 2020 The Qt Company Ltd.
2// Copyright (C) 2019 Intel Corporation.
3// Copyright (C) 2019 Mail.ru Group.
4// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
5// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
6
7#ifndef QLATIN1STRINGVIEW_H
8#define QLATIN1STRINGVIEW_H
9
10#include <QtCore/qchar.h>
11#include <QtCore/qnamespace.h>
12#include <QtCore/qtversionchecks.h>
13#include <QtCore/qstringview.h>
14
15#if 0
16// Workaround for generating forward headers
17#pragma qt_class(QLatin1String)
18#pragma qt_class(QLatin1StringView)
19#endif
20
21QT_BEGIN_NAMESPACE
22
23class QString;
24
25#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC)
26# define Q_L1S_VIEW_IS_PRIMARY
27class QLatin1StringView
28#else
29class QLatin1String
30#endif
31{
32public:
33#ifdef Q_L1S_VIEW_IS_PRIMARY
34 constexpr QLatin1StringView() noexcept {}
35 constexpr QLatin1StringView(std::nullptr_t) noexcept : QLatin1StringView() {}
36 constexpr explicit QLatin1StringView(const char *s) noexcept
37 : QLatin1StringView(s, s ? qsizetype(QtPrivate::lengthHelperPointer(s)) : 0) {}
38 constexpr QLatin1StringView(const char *f, const char *l)
39 : QLatin1StringView(f, qsizetype(l - f)) {}
40 constexpr QLatin1StringView(const char *s, qsizetype sz) noexcept : m_data(s), m_size(sz) {}
41 explicit QLatin1StringView(const QByteArray &s) noexcept
42 : QLatin1StringView(s.constData(), s.size()) {}
43 constexpr explicit QLatin1StringView(QByteArrayView s) noexcept
44 : QLatin1StringView(s.constData(), s.size()) {}
45#else
46 constexpr QLatin1String() noexcept : m_size(0), m_data(nullptr) {}
47 Q_WEAK_OVERLOAD
48 constexpr QLatin1String(std::nullptr_t) noexcept : QLatin1String() {}
49 constexpr explicit QLatin1String(const char *s) noexcept
50 : m_size(s ? qsizetype(QtPrivate::lengthHelperPointer(data: s)) : 0), m_data(s) {}
51 constexpr QLatin1String(const char *f, const char *l)
52 : QLatin1String(f, qsizetype(l - f)) {}
53 constexpr QLatin1String(const char *s, qsizetype sz) noexcept : m_size(sz), m_data(s) {}
54 explicit QLatin1String(const QByteArray &s) noexcept : m_size(s.size()), m_data(s.constData()) {}
55 constexpr explicit QLatin1String(QByteArrayView s) noexcept : m_size(s.size()), m_data(s.data()) {}
56#endif // !Q_L1S_VIEW_IS_PRIMARY
57
58 inline QString toString() const;
59
60 constexpr const char *latin1() const noexcept { return m_data; }
61 constexpr qsizetype size() const noexcept { return m_size; }
62 constexpr const char *data() const noexcept { return m_data; }
63 [[nodiscard]] constexpr const char *constData() const noexcept { return data(); }
64 [[nodiscard]] constexpr const char *constBegin() const noexcept { return begin(); }
65 [[nodiscard]] constexpr const char *constEnd() const noexcept { return end(); }
66
67 [[nodiscard]] constexpr QLatin1Char first() const { return front(); }
68 [[nodiscard]] constexpr QLatin1Char last() const { return back(); }
69
70 [[nodiscard]] constexpr qsizetype length() const noexcept { return size(); }
71
72 constexpr bool isNull() const noexcept { return !data(); }
73 constexpr bool isEmpty() const noexcept { return !size(); }
74
75 [[nodiscard]] constexpr bool empty() const noexcept { return size() == 0; }
76
77 template <typename...Args>
78 [[nodiscard]] inline QString arg(Args &&...args) const;
79
80 [[nodiscard]] constexpr QLatin1Char at(qsizetype i) const
81 {
82 Q_ASSERT(i >= 0);
83 Q_ASSERT(i < size());
84 return QLatin1Char(m_data[i]);
85 }
86 [[nodiscard]] constexpr QLatin1Char operator[](qsizetype i) const { return at(i); }
87
88 [[nodiscard]] constexpr QLatin1Char front() const { return at(i: 0); }
89 [[nodiscard]] constexpr QLatin1Char back() const { return at(i: size() - 1); }
90
91 [[nodiscard]] int compare(QStringView other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
92 { return QtPrivate::compareStrings(lhs: *this, rhs: other, cs); }
93 [[nodiscard]] int compare(QLatin1StringView other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
94 { return QtPrivate::compareStrings(lhs: *this, rhs: other, cs); }
95 [[nodiscard]] inline int compare(QUtf8StringView other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept;
96 [[nodiscard]] constexpr int compare(QChar c) const noexcept
97 { return isEmpty() ? -1 : front() == c ? int(size() > 1) : uchar(m_data[0]) - c.unicode(); }
98 [[nodiscard]] int compare(QChar c, Qt::CaseSensitivity cs) const noexcept
99 { return QtPrivate::compareStrings(lhs: *this, rhs: QStringView(&c, 1), cs); }
100
101 [[nodiscard]] bool startsWith(QStringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
102 { return QtPrivate::startsWith(haystack: *this, needle: s, cs); }
103 [[nodiscard]] bool startsWith(QLatin1StringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
104 { return QtPrivate::startsWith(haystack: *this, needle: s, cs); }
105 [[nodiscard]] constexpr bool startsWith(QChar c) const noexcept
106 { return !isEmpty() && front() == c; }
107 [[nodiscard]] bool startsWith(QChar c, Qt::CaseSensitivity cs) const noexcept
108 { return QtPrivate::startsWith(haystack: *this, needle: QStringView(&c, 1), cs); }
109
110 [[nodiscard]] bool endsWith(QStringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
111 { return QtPrivate::endsWith(haystack: *this, needle: s, cs); }
112 [[nodiscard]] bool endsWith(QLatin1StringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
113 { return QtPrivate::endsWith(haystack: *this, needle: s, cs); }
114 [[nodiscard]] constexpr bool endsWith(QChar c) const noexcept
115 { return !isEmpty() && back() == c; }
116 [[nodiscard]] bool endsWith(QChar c, Qt::CaseSensitivity cs) const noexcept
117 { return QtPrivate::endsWith(haystack: *this, needle: QStringView(&c, 1), cs); }
118
119 [[nodiscard]] qsizetype indexOf(QStringView s, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
120 { return QtPrivate::findString(haystack: *this, from, needle: s, cs); }
121 [[nodiscard]] qsizetype indexOf(QLatin1StringView s, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
122 { return QtPrivate::findString(haystack: *this, from, needle: s, cs); }
123 [[nodiscard]] qsizetype indexOf(QChar c, qsizetype from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
124 { return QtPrivate::findString(haystack: *this, from, needle: QStringView(&c, 1), cs); }
125
126 [[nodiscard]] bool contains(QStringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
127 { return indexOf(s, from: 0, cs) != -1; }
128 [[nodiscard]] bool contains(QLatin1StringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
129 { return indexOf(s, from: 0, cs) != -1; }
130 [[nodiscard]] bool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
131 { return indexOf(s: QStringView(&c, 1), from: 0, cs) != -1; }
132
133 [[nodiscard]] qsizetype lastIndexOf(QStringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
134 { return lastIndexOf(s, from: size(), cs); }
135 [[nodiscard]] qsizetype lastIndexOf(QStringView s, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
136 { return QtPrivate::lastIndexOf(haystack: *this, from, needle: s, cs); }
137 [[nodiscard]] qsizetype lastIndexOf(QLatin1StringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
138 { return lastIndexOf(s, from: size(), cs); }
139 [[nodiscard]] qsizetype lastIndexOf(QLatin1StringView s, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
140 { return QtPrivate::lastIndexOf(haystack: *this, from, needle: s, cs); }
141 [[nodiscard]] qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
142 { return lastIndexOf(c, from: -1, cs); }
143 [[nodiscard]] qsizetype lastIndexOf(QChar c, qsizetype from, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
144 { return QtPrivate::lastIndexOf(haystack: *this, from, needle: QStringView(&c, 1), cs); }
145
146 [[nodiscard]] qsizetype count(QStringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
147 { return QtPrivate::count(haystack: *this, needle: str, cs); }
148 [[nodiscard]] qsizetype count(QLatin1StringView str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
149 { return QtPrivate::count(haystack: *this, needle: str, cs); }
150 [[nodiscard]] qsizetype count(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
151 { return QtPrivate::count(haystack: *this, needle: ch, cs); }
152
153 [[nodiscard]] short toShort(bool *ok = nullptr, int base = 10) const
154 { return QtPrivate::toIntegral<short>(data: QByteArrayView(*this), ok, base); }
155 [[nodiscard]] ushort toUShort(bool *ok = nullptr, int base = 10) const
156 { return QtPrivate::toIntegral<ushort>(data: QByteArrayView(*this), ok, base); }
157 [[nodiscard]] int toInt(bool *ok = nullptr, int base = 10) const
158 { return QtPrivate::toIntegral<int>(data: QByteArrayView(*this), ok, base); }
159 [[nodiscard]] uint toUInt(bool *ok = nullptr, int base = 10) const
160 { return QtPrivate::toIntegral<uint>(data: QByteArrayView(*this), ok, base); }
161 [[nodiscard]] long toLong(bool *ok = nullptr, int base = 10) const
162 { return QtPrivate::toIntegral<long>(data: QByteArrayView(*this), ok, base); }
163 [[nodiscard]] ulong toULong(bool *ok = nullptr, int base = 10) const
164 { return QtPrivate::toIntegral<ulong>(data: QByteArrayView(*this), ok, base); }
165 [[nodiscard]] qlonglong toLongLong(bool *ok = nullptr, int base = 10) const
166 { return QtPrivate::toIntegral<qlonglong>(data: QByteArrayView(*this), ok, base); }
167 [[nodiscard]] qulonglong toULongLong(bool *ok = nullptr, int base = 10) const
168 { return QtPrivate::toIntegral<qulonglong>(data: QByteArrayView(*this), ok, base); }
169 [[nodiscard]] float toFloat(bool *ok = nullptr) const
170 {
171 const auto r = QtPrivate::toFloat(a: *this);
172 if (ok)
173 *ok = bool(r);
174 return r.value_or(u: 0.0f);
175 }
176 [[nodiscard]] double toDouble(bool *ok = nullptr) const
177 {
178 const auto r = QtPrivate::toDouble(a: *this);
179 if (ok)
180 *ok = bool(r);
181 return r.value_or(u: 0.0);
182 }
183
184 using value_type = const char;
185 using pointer = value_type*;
186 using const_pointer = pointer;
187 using reference = value_type&;
188 using const_reference = reference;
189 using iterator = value_type*;
190 using const_iterator = iterator;
191 using difference_type = qsizetype; // violates Container concept requirements
192 using size_type = qsizetype; // violates Container concept requirements
193
194 constexpr const_iterator begin() const noexcept { return data(); }
195 constexpr const_iterator cbegin() const noexcept { return data(); }
196 constexpr const_iterator end() const noexcept { return data() + size(); }
197 constexpr const_iterator cend() const noexcept { return data() + size(); }
198
199 using reverse_iterator = std::reverse_iterator<iterator>;
200 using const_reverse_iterator = reverse_iterator;
201
202 const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
203 const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); }
204 const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
205 const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); }
206
207 [[nodiscard]] constexpr QLatin1StringView mid(qsizetype pos, qsizetype n = -1) const
208 {
209 using namespace QtPrivate;
210 auto result = QContainerImplHelper::mid(originalLength: size(), position: &pos, length: &n);
211 return result == QContainerImplHelper::Null ? QLatin1StringView()
212 : QLatin1StringView(m_data + pos, n);
213 }
214 [[nodiscard]] constexpr QLatin1StringView left(qsizetype n) const
215 {
216 if (size_t(n) >= size_t(size()))
217 n = size();
218 return {m_data, n};
219 }
220 [[nodiscard]] constexpr QLatin1StringView right(qsizetype n) const
221 {
222 if (size_t(n) >= size_t(size()))
223 n = size();
224 return {m_data + m_size - n, n};
225 }
226
227 [[nodiscard]] constexpr QLatin1StringView sliced(qsizetype pos) const
228 { verify(pos, n: 0); return {m_data + pos, m_size - pos}; }
229 [[nodiscard]] constexpr QLatin1StringView sliced(qsizetype pos, qsizetype n) const
230 { verify(pos, n); return {m_data + pos, n}; }
231 [[nodiscard]] constexpr QLatin1StringView first(qsizetype n) const
232 { verify(pos: 0, n); return sliced(pos: 0, n); }
233 [[nodiscard]] constexpr QLatin1StringView last(qsizetype n) const
234 { verify(pos: 0, n); return sliced(pos: size() - n, n); }
235 [[nodiscard]] constexpr QLatin1StringView chopped(qsizetype n) const
236 { verify(pos: 0, n); return sliced(pos: 0, n: size() - n); }
237
238 constexpr void chop(qsizetype n)
239 { verify(pos: 0, n); m_size -= n; }
240 constexpr void truncate(qsizetype n)
241 { verify(pos: 0, n); m_size = n; }
242
243 [[nodiscard]] QLatin1StringView trimmed() const noexcept { return QtPrivate::trimmed(s: *this); }
244
245 template <typename Needle, typename...Flags>
246 [[nodiscard]] constexpr auto tokenize(Needle &&needle, Flags...flags) const
247 noexcept(noexcept(qTokenize(std::declval<const QLatin1StringView &>(),
248 std::forward<Needle>(needle), flags...)))
249 -> decltype(qTokenize(*this, std::forward<Needle>(needle), flags...))
250 { return qTokenize(*this, std::forward<Needle>(needle), flags...); }
251
252 friend bool operator==(QLatin1StringView s1, QLatin1StringView s2) noexcept
253 { return QByteArrayView(s1) == QByteArrayView(s2); }
254 friend bool operator!=(QLatin1StringView s1, QLatin1StringView s2) noexcept
255 { return !(s1 == s2); }
256 friend bool operator<(QLatin1StringView s1, QLatin1StringView s2) noexcept
257 {
258 const qsizetype len = qMin(a: s1.size(), b: s2.size());
259 const int r = len ? memcmp(s1: s1.latin1(), s2: s2.latin1(), n: len) : 0;
260 return r < 0 || (r == 0 && s1.size() < s2.size());
261 }
262 friend bool operator>(QLatin1StringView s1, QLatin1StringView s2) noexcept
263 { return s2 < s1; }
264 friend bool operator<=(QLatin1StringView s1, QLatin1StringView s2) noexcept
265 { return !(s1 > s2); }
266 friend bool operator>=(QLatin1StringView s1, QLatin1StringView s2) noexcept
267 { return !(s1 < s2); }
268
269 // QChar <> QLatin1StringView
270 friend bool operator==(QChar lhs, QLatin1StringView rhs) noexcept { return rhs.size() == 1 && lhs == rhs.front(); }
271 friend bool operator< (QChar lhs, QLatin1StringView rhs) noexcept { return compare_helper(data1: &lhs, length1: 1, s2: rhs) < 0; }
272 friend bool operator> (QChar lhs, QLatin1StringView rhs) noexcept { return compare_helper(data1: &lhs, length1: 1, s2: rhs) > 0; }
273 friend bool operator!=(QChar lhs, QLatin1StringView rhs) noexcept { return !(lhs == rhs); }
274 friend bool operator<=(QChar lhs, QLatin1StringView rhs) noexcept { return !(lhs > rhs); }
275 friend bool operator>=(QChar lhs, QLatin1StringView rhs) noexcept { return !(lhs < rhs); }
276
277 friend bool operator==(QLatin1StringView lhs, QChar rhs) noexcept { return rhs == lhs; }
278 friend bool operator!=(QLatin1StringView lhs, QChar rhs) noexcept { return !(rhs == lhs); }
279 friend bool operator< (QLatin1StringView lhs, QChar rhs) noexcept { return rhs > lhs; }
280 friend bool operator> (QLatin1StringView lhs, QChar rhs) noexcept { return rhs < lhs; }
281 friend bool operator<=(QLatin1StringView lhs, QChar rhs) noexcept { return !(rhs < lhs); }
282 friend bool operator>=(QLatin1StringView lhs, QChar rhs) noexcept { return !(rhs > lhs); }
283
284 // QStringView <> QLatin1StringView
285 friend bool operator==(QStringView lhs, QLatin1StringView rhs) noexcept
286 { return lhs.size() == rhs.size() && QtPrivate::equalStrings(lhs, rhs); }
287 friend bool operator!=(QStringView lhs, QLatin1StringView rhs) noexcept { return !(lhs == rhs); }
288 friend bool operator< (QStringView lhs, QLatin1StringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) < 0; }
289 friend bool operator<=(QStringView lhs, QLatin1StringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) <= 0; }
290 friend bool operator> (QStringView lhs, QLatin1StringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) > 0; }
291 friend bool operator>=(QStringView lhs, QLatin1StringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) >= 0; }
292
293 friend bool operator==(QLatin1StringView lhs, QStringView rhs) noexcept
294 { return lhs.size() == rhs.size() && QtPrivate::equalStrings(lhs, rhs); }
295 friend bool operator!=(QLatin1StringView lhs, QStringView rhs) noexcept { return !(lhs == rhs); }
296 friend bool operator< (QLatin1StringView lhs, QStringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) < 0; }
297 friend bool operator<=(QLatin1StringView lhs, QStringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) <= 0; }
298 friend bool operator> (QLatin1StringView lhs, QStringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) > 0; }
299 friend bool operator>=(QLatin1StringView lhs, QStringView rhs) noexcept { return QtPrivate::compareStrings(lhs, rhs) >= 0; }
300
301
302#if !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII)
303 QT_ASCII_CAST_WARN inline bool operator==(const char *s) const;
304 QT_ASCII_CAST_WARN inline bool operator!=(const char *s) const;
305 QT_ASCII_CAST_WARN inline bool operator<(const char *s) const;
306 QT_ASCII_CAST_WARN inline bool operator>(const char *s) const;
307 QT_ASCII_CAST_WARN inline bool operator<=(const char *s) const;
308 QT_ASCII_CAST_WARN inline bool operator>=(const char *s) const;
309
310 QT_ASCII_CAST_WARN inline bool operator==(const QByteArray &s) const;
311 QT_ASCII_CAST_WARN inline bool operator!=(const QByteArray &s) const;
312 QT_ASCII_CAST_WARN inline bool operator<(const QByteArray &s) const;
313 QT_ASCII_CAST_WARN inline bool operator>(const QByteArray &s) const;
314 QT_ASCII_CAST_WARN inline bool operator<=(const QByteArray &s) const;
315 QT_ASCII_CAST_WARN inline bool operator>=(const QByteArray &s) const;
316
317 QT_ASCII_CAST_WARN friend bool operator==(const char *s1, QLatin1StringView s2) { return compare_helper(s2, s1) == 0; }
318 QT_ASCII_CAST_WARN friend bool operator!=(const char *s1, QLatin1StringView s2) { return compare_helper(s2, s1) != 0; }
319 QT_ASCII_CAST_WARN friend bool operator< (const char *s1, QLatin1StringView s2) { return compare_helper(s2, s1) > 0; }
320 QT_ASCII_CAST_WARN friend bool operator> (const char *s1, QLatin1StringView s2) { return compare_helper(s2, s1) < 0; }
321 QT_ASCII_CAST_WARN friend bool operator<=(const char *s1, QLatin1StringView s2) { return compare_helper(s2, s1) >= 0; }
322 QT_ASCII_CAST_WARN friend bool operator>=(const char *s1, QLatin1StringView s2) { return compare_helper(s2, s1) <= 0; }
323#endif // !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII)
324
325private:
326 Q_ALWAYS_INLINE constexpr void verify([[maybe_unused]] qsizetype pos,
327 [[maybe_unused]] qsizetype n = 1) const
328 {
329 Q_ASSERT(pos >= 0);
330 Q_ASSERT(pos <= size());
331 Q_ASSERT(n >= 0);
332 Q_ASSERT(n <= size() - pos);
333 }
334 static int compare_helper(const QLatin1StringView &s1, const char *s2) noexcept
335 { return compare_helper(s1, s2, len: qstrlen(str: s2)); }
336 Q_CORE_EXPORT static int compare_helper(const QLatin1StringView &s1, const char *s2, qsizetype len) noexcept;
337 Q_CORE_EXPORT static int compare_helper(const QChar *data1, qsizetype length1,
338 QLatin1StringView s2,
339 Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept;
340#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED)
341 const char *m_data = nullptr;
342 qsizetype m_size = 0;
343#else
344 qsizetype m_size;
345 const char *m_data;
346#endif
347};
348#ifdef Q_L1S_VIEW_IS_PRIMARY
349Q_DECLARE_TYPEINFO(QLatin1StringView, Q_RELOCATABLE_TYPE);
350#else
351Q_DECLARE_TYPEINFO(QLatin1String, Q_RELOCATABLE_TYPE);
352#endif
353
354namespace Qt {
355inline namespace Literals {
356inline namespace StringLiterals {
357
358constexpr inline QLatin1StringView operator""_L1(const char *str, size_t size) noexcept
359{
360 return {str, qsizetype(size)};
361}
362
363} // StringLiterals
364} // Literals
365} // Qt
366
367QT_END_NAMESPACE
368
369#ifdef Q_L1S_VIEW_IS_PRIMARY
370# undef Q_L1S_VIEW_IS_PRIMARY
371#endif
372
373#endif // QLATIN1STRINGVIEW_H
374