Changeset 460 for cpp/common
- Timestamp:
- 02/03/16 22:59:30 (9 years ago)
- Location:
- cpp/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/stl-util.cpp
r382 r460 151 151 } 152 152 153 string stripFileDir(const string& filename) 154 { 155 size_t sep = filename.rfind(PATH_SEPARATOR_CHAR); 156 if (sep == string::npos) return filename; 157 return filename.substr(sep+1); 158 } 159 153 160 string getFileExt(const string& filename) 154 161 { -
cpp/common/stl-util.h
r286 r460 46 46 string getFileExt(const string& filename); // get extension (starting with ".") from filename 47 47 string getFileDir(const string& filename); // get path component excluding filename ("" if no dir in file) 48 string stripFileDir(const string& filename); // strip path component from filename 48 49 49 50
Note: See TracChangeset
for help on using the changeset viewer.