MCPcopy Create free account
hub / github.com/TASEmulators/fceux / getExtension

Function getExtension

src/utils/xstring.cpp:768–780  ·  view source on GitHub ↗

TODO - dont we already have another function that can do this

Source from the content-addressed store, hash-verified

766
767//TODO - dont we already have another function that can do this
768std::string getExtension(const char* input) {
769 char buf[1024];
770 strcpy(buf,input);
771 char* dot=strrchr(buf,'.');
772 if(!dot)
773 return "";
774 char ext [512];
775 strcpy(ext, dot+1);
776 int k, extlen=strlen(ext);
777 for(k=0;k<extlen;k++)
778 ext[k]=tolower(ext[k]);
779 return ext;
780}
781
782//strips the file extension off a filename
783std::string StripExtension(std::string filename)

Callers 3

FilterByExtensionMethod · 0.85
FCEUD_ScanArchiveFunction · 0.85
ReplayDialogProcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected