summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/includes/qstring.qdocinc
blob: 66ed12dff3fa2235e55c2d286711167c9d17f10a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

// \1 is either "search" or "comparison"
//! [search-comparison-case-sensitivity]
If \a cs is Qt::CaseSensitive (the default), the \1 is case-sensitive;
otherwise the \1 is case-insensitive.
//! [search-comparison-case-sensitivity]

//! [negative-index-start-search-from-end]
If \a from is -1, the search starts at the last character; if it is
-2, at the next to last character and so on.
//! [negative-index-start-search-from-end]

//! [qstring-first-index-of]
Returns the index position of the first occurrence of the \1 \a \2
in this string, searching forward from index position \a from.
Returns -1 if \a \2 is not found.
//! [qstring-first-index-of]

//! [qstring-last-index-of]
Returns the index position of the last occurrence of the \1 \a \2
in this string, searching backward from index position \a from.
//! [qstring-last-index-of]

//! [qstring-local-8-bit-equivalent]
On Unix systems this is equivalent to \1().
Note that on Apple systems this function does not take
\l{https://developer.apple.com/documentation/foundation/nsstring/1410091-defaultcstringencoding?language=objc}
{NSString.defaultCStringEncoding} or
\l{https://developer.apple.com/documentation/corefoundation/1541720-cfstringgetsystemencoding?language=objc}
{CFStringGetSystemEncoding()} into account, as these functions
typically return the legacy "Western (Mac OS Roman)" encoding,
which should not be used on modern Apple operating systems.
On Windows the system's current code page is used.
//! [qstring-local-8-bit-equivalent]