MCPcopy Create free account
hub / github.com/android/ndk-samples / GetFileBasename

Function GetFileBasename

base/src/main/cpp/logging.cpp:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41namespace ndksamples::base {
42
43static const char* GetFileBasename(const char* file) {
44 // We can't use basename(3) even on Unix because the Mac doesn't
45 // have a non-modifying basename.
46 const char* last_slash = strrchr(file, '/');
47 if (last_slash != nullptr) {
48 return last_slash + 1;
49 }
50 return file;
51}
52
53static int32_t LogIdTolog_id_t(LogId log_id) {
54 switch (log_id) {

Callers 1

LogMessageDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected