Given a string \"filename.conf\", how to I verify the extension part?
\"filename.conf\"
I need a cross platform solution.
Or you can use this:
char *ExtractFileExt(char *FileName) { std::string s = FileName; int Len = s.length(); while(TRUE) { if(FileName[Len] != '.') Len--; else { char *Ext = new char[s.length()-Len+1]; for(int a=0; a
This code is cross-platform