diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-10-08 20:56:22 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-10-25 12:01:58 -0700 |
commit | 1cce2cceffed30c3300ceffe85c0aba201064979 (patch) | |
tree | 7c6eb7bb8f360252cb198bc0ff3ac6f05d2d0920 /src/corelib/text/qstring.h | |
parent | f4101f9953ec63ee09e73b4b72bf6ed561d7568f (diff) |
QString/QByteArray: make the sliced(pos) overload call the other sliced
Complements 00c1c04bd536aa3db8f0d2ee33261cb4d2a79002.
Change-Id: I8f3ce163ccc5408cac39fffd178c543d594cf64f
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/corelib/text/qstring.h')
-rw-r--r-- | src/corelib/text/qstring.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index e2f5d99d90..411430a189 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -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 & |