11 #include <zypp-core/base/IOTools.h> 21 const char *p = data.data();
22 while (*p ==
' ' || *p ==
'\t' || *p ==
'\r' || *p ==
'\n')
26 if ( !strncasecmp( p,
"zsync:", 6 ) ) {
30 if (!strncasecmp(p,
"<?xml", 5))
32 while (*p && *p !=
'>')
36 while (*p ==
' ' || *p ==
'\t' || *p ==
'\r' || *p ==
'\n')
39 bool ret = !strncasecmp( p,
"<metalink", 9 ) ? true :
false;
48 std::unique_ptr<FILE, int(*)(FILE *)> fd( fopen( file.
c_str(),
"r" ), &fclose );
const char * c_str() const
String representation.
std::vector< char > peek_data_fd(FILE *fd, off_t offset, size_t count)