MCPcopy Create free account
hub / github.com/csyonghe/Spire / GetFileExt

Method GetFileExt

Source/CoreLib/LibIO.cpp:68–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 return path.SubString(pos, dotPos - pos);
67 }
68 String Path::GetFileExt(const String & path)
69 {
70 int dotPos = path.LastIndexOf('.');
71 if (dotPos != -1)
72 return path.SubString(dotPos+1, path.Length()-dotPos-1);
73 else
74 return "";
75 }
76 String Path::GetDirectoryName(const String & path)
77 {
78 int pos = path.LastIndexOf('/');

Callers

nothing calls this directly

Calls 3

SubStringMethod · 0.80
LastIndexOfMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected