UTF8String Filename::getExtension(bool includeDot) const { const UTF8String fname = getFilename(); UTF8String::const_reverse_iterator it = std::find(fname.rbegin(), fname.rend(), '.'); if (it!=fname.rend()) return UTF8String(it.base() - ((includeDot) ? 1 : 0), fname.end()); else return UTF8String(""); }
UTF8String Filename::getBaseFilename() const { const UTF8String fname = getFilename(); UTF8String::const_reverse_iterator it = std::find(fname.rbegin(), fname.rend(), '.'); if (it!=fname.rend()) return UTF8String(fname.begin(), it.base()-1); else return UTF8String(""); }