MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / WindowsPath_isUNC

Function WindowsPath_isUNC

Tools/ToolsBootstrap.c:61–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 if (firstSeparator == 0 || firstSeparator >= length - 1) return 0;
60 int secondSeparator = firstSeparator + 1;
61 while (secondSeparator < length && data[secondSeparator] != L'\\') secondSeparator += 1;
62 return secondSeparator > firstSeparator + 1;
63}
64
65static int WindowsPath_isUNC(const wchar_t* data, int length) {
66 return length >= 5 && data[0] == L'\\' && data[1] == L'\\' &&
67 WindowsPath_hasUNCServerAndShare(data + 2, length - 2);

Callers 1

Calls 1

Tested by

no test coverage detected