X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/fe7fa47c1141066c89ab3382c318a4b9d00fe249..0e58689ae76e8155bc1f418323aa9e56c34187f6:/apt-pkg/contrib/string_view.h diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h index b4ce0431c..37a30a6df 100644 --- a/apt-pkg/contrib/string_view.h +++ b/apt-pkg/contrib/string_view.h @@ -55,9 +55,9 @@ public: return found - data_; } - size_t rfind(int c, size_t pos=0) const { - if (pos != 0) - return substr(pos).find(c); + size_t rfind(int c, size_t pos=npos) const { + if (pos != npos) + return substr(0, pos).rfind(c); const char *found = static_cast(memrchr(data_, c, size_));