MCPcopy Create free account
hub / github.com/Tencent/MMKV / _getFileName

Function _getFileName

Core/MMKVLog.cpp:36–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35#ifndef __FILE_NAME__
36const char *_getFileName(const char *path) {
37 const char *ptr = strrchr(path, '/');
38 if (!ptr) {
39 ptr = strrchr(path, '\\');
40 }
41 if (ptr) {
42 return ptr + 1;
43 } else {
44 return path;
45 }
46}
47#endif
48
49mmkv::MMKVHandler *g_handler = nullptr;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected