in host/common/win32/extendedlengthpath.h [347:379]
static int prefixLength(wchar_t const * extName, ///< name to check
size_t len, ///< length of name
bool& uncPrefix) ///< set to true if unc prefix found, else set to false
{
uncPrefix = false;
if (len > 6) {
// all extended-legnth paths begin with "\\?\"
if ((L'\\' == extName[0] || L'/' == extName[0])
&& (L'\\' == extName[1] || L'/' == extName[1])
&& L'?' == extName[2]
&& (L'\\' == extName[3] || L'/' == extName[3])) {
// check if unc
if (len > 8
&& L'U' == extName[4]
&& L'N' == extName[5]
&& L'C' == extName[6]
&& (L'\\' == extName[7] || L'/' == extName[7])) {
uncPrefix = true;
return 8;
}
// check if full path
if (iswalpha(extName[4])
&& L':' == extName[5]
&& (L'\\' == extName[6] || L'/' == extName[6])) {
return 4;
}
}
}
return 0;
}