stdStr Path::getName(const stdStr &fileSpec) { size_t pos = fileSpec.find_last_of(TEXT("/")); if(pos >= fileSpec.length()) pos = fileSpec.find_last_of(TEXT("\\")); if(pos >= fileSpec.length()) return toLower(fileSpec); return toLower(fileSpec.substr(pos+1,fileSpec.length()-pos)); }
stdStr Path::getPath(const stdStr &fileSpec) { size_t pos = fileSpec.find_last_of(TEXT("/")); if(pos >= fileSpec.length()) pos = fileSpec.find_last_of(TEXT("\\")); if(pos >= fileSpec.length()) return TEXT("."); if(fileSpec.find(TEXT("."),pos+1)) return toLower(fileSpec.substr(0,pos+1)); return fileSpec; }
stdStr Path::getExt(const stdStr& fileSpec) { size_t pos = fileSpec.find_last_of(TEXT(".")); if(pos < fileSpec.length()) return toLower(fileSpec.substr(pos+1,fileSpec.length()-pos)); return TEXT(""); }