MCPcopy Create free account
hub / github.com/crownengine/crown / is_absolute

Function is_absolute

src/core/filesystem/path.cpp:31–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace path
30{
31 bool is_absolute(const char *path)
32 {
33 CE_ENSURE(NULL != path);
34#if CROWN_PLATFORM_WINDOWS
35 return (strlen32(path) > 2 && isalpha(path[0]) && path[1] == ':' && path[2] == PATH_SEPARATOR)
36 || (strlen32(path) > 1 && path[0] == '/' && isalpha(path[1]))
37 ;
38#else
39 return strlen32(path) > 0
40 && path[0] == PATH_SEPARATOR
41 ;
42#endif
43 }
44
45 bool is_relative(const char *path)
46 {

Callers 5

test_pathFunction · 0.85
absolute_pathMethod · 0.85
is_relativeFunction · 0.85
is_rootFunction · 0.85
parseMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_pathFunction · 0.68