Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_corelib_text_qstringview.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QStringView>
5
6//! [0]
7 void myfun1(QStringView sv); // preferred
8 void myfun2(const QStringView &sv); // compiles and works, but slower
9//! [0]
10
11//! [1]
12void fun(QChar ch) { myfun1(QStringView(&ch, 1)); }
13//! [1]
void myfun1(QAnyStringView sv)
[0]
void myfun2(const QAnyStringView &sv)
void fun(QByteArrayView bv)
[0]