MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / path_base

Function path_base

deps/GraphBLAS/CUDA/jitify.hpp:364–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362 return src;
363}
364inline std::string path_base(std::string p) {
365 // "/usr/local/myfile.dat" -> "/usr/local"
366 // "foo/bar" -> "foo"
367 // "foo/bar/" -> "foo/bar"
368#if defined _WIN32 || defined _WIN64
369 char sep = '\\';
370#else
371 char sep = '/';
372#endif
373 size_t i = p.find_last_of(sep);
374 if (i != std::string::npos) {
375 return p.substr(0, i);
376 } else {
377 return "";
378 }
379}
380inline std::string path_join(std::string p1, std::string p2) {
381#ifdef _WIN32
382 char sep = '\\';

Callers 1

load_programFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected