diff options
Diffstat (limited to 'src/corelib/text/qstring.cpp')
| -rw-r--r-- | src/corelib/text/qstring.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 1fae9ef07af..15cf40ef885 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -698,6 +698,11 @@ qsizetype QtPrivate::qustrlen(const char16_t *str) noexcept return result; } +qsizetype QtPrivate::qustrnlen(const char16_t *str, qsizetype maxlen) noexcept +{ + return qustrchr({ str, maxlen }, u'\0') - str; +} + /*! * \internal * |
