X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/eff0c22e59e65b6b63e854ff41eb091278e05714..ad24ea39b5dd0ce990a20a60b888511261ec21e1:/apt-pkg/pkgcache.h?ds=sidebyside diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 9fea44e06..91228f713 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -245,6 +245,16 @@ class pkgCache /*{{{*/ APT_HIDDEN PkgIterator FindPkg(APT::StringView Name, APT::StringView Arch); #endif +#ifdef APT_PKG_EXPOSE_STRING_VIEW + APT::StringView ViewString(map_stringitem_t idx) const + { + char *name = StrP + idx; + uint16_t len = *reinterpret_cast(name - sizeof(uint16_t)); + return APT::StringView(name, len); + } +#endif + + GrpIterator FindGrp(const std::string &Name); PkgIterator FindPkg(const std::string &Name); PkgIterator FindPkg(const std::string &Name, const std::string &Arch);