22 namespace portability {
25 if (path ==
nullptr || !strcmp(path,
"")) {
28 if (!strcmp(path,
"/") || !strcmp(path,
"\\")) {
32 size_t len = strlen(path);
33 if (path[len - 1] ==
'/' || path[len - 1] ==
'\\') {
37 char* pos = strrchr(path,
'/');
38 if (strrchr(path,
'\\') > pos) {
39 pos = strrchr(path,
'\\');
56 extern "C" char* dirname(
char* path) {
—— Concurrent Priority Queue Implementation ——
char * internal_dirname(char *path)