TODO - dont we already have another function that can do this
| 766 | |
| 767 | //TODO - dont we already have another function that can do this |
| 768 | std::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 |
| 783 | std::string StripExtension(std::string filename) |
no outgoing calls
no test coverage detected