1 /****************************************************************************
2 **
3 ** DQt - D bindings for the Qt Toolkit
4 **
5 ** GNU Lesser General Public License Usage
6 ** This file may be used under the terms of the GNU Lesser
7 ** General Public License version 3 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
9 ** packaging of this file. Please review the following information to
10 ** ensure the GNU Lesser General Public License version 3 requirements
11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
12 **
13 ****************************************************************************/
14 module qt.core.stringalgorithms;
15 extern(C++):
16 
17 import qt.config;
18 import qt.core.bytearray;
19 import qt.core.global;
20 import qt.core.namespace;
21 import qt.core.string;
22 import qt.core.stringview;
23 import qt.core.vector;
24 import qt.helpers;
25 
26 /+ #if 0
27 #pragma qt_class(QStringAlgorithms)
28 #endif
29 
30 
31 class QByteArray;
32 class QLatin1String;
33 class QStringView;
34 class QChar;
35 template <typename T> class QVector; +/
36 
37 extern(C++, "QtPrivate") {
38 
39 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype qustrlen(const(ushort)* str)/+ noexcept+/;
40 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ const(ushort)* qustrchr(QStringView str, ushort ch)/+ noexcept+/;
41 
42 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ int compareStrings(QStringView   lhs, QStringView   rhs, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
43 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ int compareStrings(QStringView   lhs, QLatin1String rhs, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
44 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ int compareStrings(QLatin1String lhs, QStringView   rhs, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
45 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ int compareStrings(QLatin1String lhs, QLatin1String rhs, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
46 
47 
48 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool startsWith(QStringView   haystack, QStringView   needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
49 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool startsWith(QStringView   haystack, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
50 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool startsWith(QLatin1String haystack, QStringView   needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
51 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool startsWith(QLatin1String haystack, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
52 
53 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool endsWith(QStringView   haystack, QStringView   needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
54 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool endsWith(QStringView   haystack, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
55 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool endsWith(QLatin1String haystack, QStringView   needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
56 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool endsWith(QLatin1String haystack, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
57 
58 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype findString(QStringView haystack, qsizetype from, QStringView needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
59 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype findString(QStringView haystack, qsizetype from, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
60 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype findString(QLatin1String haystack, qsizetype from, QStringView needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
61 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype findString(QLatin1String haystack, qsizetype from, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
62 
63 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype lastIndexOf(QStringView haystack, qsizetype from, QStringView needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
64 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype lastIndexOf(QStringView haystack, qsizetype from, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
65 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype lastIndexOf(QLatin1String haystack, qsizetype from, QStringView needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
66 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ qsizetype lastIndexOf(QLatin1String haystack, qsizetype from, QLatin1String needle, /+ Qt:: +/qt.core.namespace.CaseSensitivity cs = /+ Qt:: +/qt.core.namespace.CaseSensitivity.CaseSensitive)/+ noexcept+/;
67 
68 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ QStringView   trimmed(QStringView   s)/+ noexcept+/;
69 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ QLatin1String trimmed(QLatin1String s)/+ noexcept+/;
70 
71 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ QByteArray convertToLatin1(QStringView str);
72 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ QByteArray convertToUtf8(QStringView str);
73 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ QByteArray convertToLocal8Bit(QStringView str);
74 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ QVector!(uint) convertToUcs4(QStringView str);
75 
76 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool isRightToLeft(QStringView string)/+ noexcept+/;
77 
78 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool isAscii(QLatin1String s)/+ noexcept+/;
79 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool isAscii(QStringView   s)/+ noexcept+/;
80 /+ Q_REQUIRED_RESULT inline            bool isLatin1(QLatin1String s) noexcept; +/
81 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool isLatin1(QStringView   s)/+ noexcept+/;
82 /+ Q_REQUIRED_RESULT +/ /+ Q_CORE_EXPORT +/ /+ Q_DECL_PURE_FUNCTION +/ bool isValidUtf16(QStringView s)/+ noexcept+/;
83 
84 } // namespace QtPRivate
85