mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Change splitToViews() return type to QVector
This commit is contained in:
parent
3d6dccc689
commit
ff707ea5af
6 changed files with 18 additions and 15 deletions
|
@ -28,15 +28,17 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
class QByteArray;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
namespace ByteArray
|
||||
{
|
||||
// Mimic QString::split(sep, behavior)
|
||||
QList<QByteArray> splitToViews(const QByteArray &in, const QByteArray &sep, const QString::SplitBehavior behavior = QString::KeepEmptyParts);
|
||||
// Mimic QString::splitRef(sep, behavior)
|
||||
QVector<QByteArray> splitToViews(const QByteArray &in, const QByteArray &sep, const QString::SplitBehavior behavior = QString::KeepEmptyParts);
|
||||
|
||||
// Mimic QByteArray::mid(pos, len) but instead of returning a full-copy,
|
||||
// we only return a partial view
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue