QString/QByteArray: make the sliced(pos) overload call the other sliced
Complements 00c1c04bd5
.
Change-Id: I8f3ce163ccc5408cac39fffd178c543d594cf64f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
parent
f4101f9953
commit
1cce2cceff
@ -167,7 +167,7 @@ public:
|
||||
[[nodiscard]] QByteArray last(qsizetype n) const &
|
||||
{ verify(0, n); return sliced(size() - n, n); }
|
||||
[[nodiscard]] QByteArray sliced(qsizetype pos) const &
|
||||
{ verify(pos, 0); return QByteArray(data() + pos, size() - pos); }
|
||||
{ verify(pos, 0); return sliced(pos, size() - pos); }
|
||||
[[nodiscard]] QByteArray sliced(qsizetype pos, qsizetype n) const &
|
||||
{ verify(pos, n); return QByteArray(d.data() + pos, n); }
|
||||
[[nodiscard]] QByteArray chopped(qsizetype len) const &
|
||||
|
@ -347,7 +347,7 @@ public:
|
||||
[[nodiscard]] QString last(qsizetype n) const &
|
||||
{ verify(0, n); return sliced(size() - n, n); }
|
||||
[[nodiscard]] QString sliced(qsizetype pos) const &
|
||||
{ verify(pos, 0); return QString(data() + pos, size() - pos); }
|
||||
{ verify(pos, 0); return sliced(pos, size() - pos); }
|
||||
[[nodiscard]] QString sliced(qsizetype pos, qsizetype n) const &
|
||||
{ verify(pos, n); return QString(begin() + pos, n); }
|
||||
[[nodiscard]] QString chopped(qsizetype n) const &
|
||||
|
Loading…
Reference in New Issue
Block a user