MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / IsUrl

Function IsUrl

src/External/CascLib/src/CascOpenStorage.cpp:1267–1282  ·  view source on GitHub ↗

Check for URL pattern. Note that the string may be terminated by CASC_PARAM_SEPARATOR instead of '\0'

Source from the content-addressed store, hash-verified

1265
1266// Check for URL pattern. Note that the string may be terminated by CASC_PARAM_SEPARATOR instead of '\0'
1267static bool IsUrl(LPCTSTR szString)
1268{
1269 while(szString[0] != 0 && szString[0] != CASC_PARAM_SEPARATOR)
1270 {
1271 // Check for "://"
1272 if(!_tcsncmp(szString, _T("://"), 3))
1273 return true;
1274
1275 // Dot or slash both indicate an URL
1276 if(szString[0] == '.' || szString[0] == '/')
1277 return true;
1278
1279 szString++;
1280 }
1281 return false;
1282}
1283
1284static LPTSTR GetNextParam(LPTSTR szParamsPtr, bool bMustBeUrl = false)
1285{

Callers 1

GetNextParamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected