QString GetExtensionFromFilename( const QString & sFilename ){ int nPos = sFilename.lastIndexOf("."); if (nPos == -1) return QString(); return sFilename.right(sFilename.size() - nPos);}
int LastIndexOf(QChar ch, const QString & sString){ int nPos; for (nPos = sString.size() - 1; nPos >= 0 && sString[nPos] != ch; --nPos) ; return nPos;}QString GetExtensionFromFilename( const QString & sFilename ){ int nPos = LastIndexOf('.', sFilename); if (nPos == -1) return QString(); return sFilename.right(sFilename.size() - nPos);}