diff options
Diffstat (limited to 'apt-pkg/contrib')
| -rw-r--r-- | apt-pkg/contrib/strutl.cc | 6 | ||||
| -rw-r--r-- | apt-pkg/contrib/strutl.h | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 69a67188e..5d91e5f11 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -104,7 +104,7 @@ std::string Join(std::vector<std::string> list, const std::string &sep) } // Returns string display length honoring multi-byte characters -size_t DisplayLength(StringView str) +size_t DisplayLength(string_view str) { size_t len = 0; @@ -930,7 +930,7 @@ string TimeRFC1123(time_t Date, bool const NumericTimezone) auto const posix = std::locale::classic(); std::ostringstream datestr; datestr.imbue(posix); - APT::StringView const fmt("%a, %d %b %Y %H:%M:%S"); + std::string_view const fmt("%a, %d %b %Y %H:%M:%S"); std::use_facet<std::time_put<char>>(posix).put( std::ostreambuf_iterator<char>(datestr), datestr, ' ', &Conv, fmt.data(), fmt.data() + fmt.size()); @@ -1307,7 +1307,7 @@ static int HexDigit(int c) // Hex2Num - Convert a long hex number into a buffer /*{{{*/ // --------------------------------------------------------------------- /* The length of the buffer must be exactly 1/2 the length of the string. */ -bool Hex2Num(const APT::StringView Str,unsigned char *Num,unsigned int Length) +bool Hex2Num(const std::string_view Str,unsigned char *Num,unsigned int Length) { if (Str.length() != Length*2) return false; diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index fdaa23766..9db908c7f 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -19,7 +19,6 @@ #ifndef STRUTL_H #define STRUTL_H -#include <apt-pkg/string_view.h> #include <cstddef> #include <cstring> #include <ctime> @@ -48,7 +47,7 @@ namespace APT { APT_PUBLIC bool Startswith(const std::string &s, const std::string &starting); APT_PUBLIC std::string Join(std::vector<std::string> list, const std::string &sep); // Returns string display length honoring multi-byte characters - APT_PUBLIC size_t DisplayLength(StringView str); + APT_PUBLIC size_t DisplayLength(std::string_view str); } } @@ -106,7 +105,7 @@ APT_PUBLIC bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigne APT_PUBLIC bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base = 0); APT_PUBLIC bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len); APT_PUBLIC bool Base256ToNum(const char *Str,unsigned long long &Res,unsigned int Len); -APT_PUBLIC bool Hex2Num(const APT::StringView Str,unsigned char *Num,unsigned int Length); +APT_PUBLIC bool Hex2Num(const std::string_view Str,unsigned char *Num,unsigned int Length); // input changing string split APT_PUBLIC bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); |
