std::string basename( std::string const& pathname ) { return std::string( std::find_if( pathname.rbegin(), pathname.rend(), MatchPathSeparator() ).base(), pathname.end() ); }
std::string FileFinder::BaseName() { return std::string ( std::find_if(m_Filename.rbegin(), m_Filename.rend(), MatchPathSeparator()).base(), m_Filename.end() ); }
std::string getBasename() { return std::string(std::find_if((this->_fullpath).rbegin(), (this->_fullpath).rend(), MatchPathSeparator()).base(), (this->_fullpath).end()); }
void splitPath(std::string const& pathname, std::string* basename, std::string* directory) { std::string::const_reverse_iterator it = std::find_if(pathname.rbegin(), pathname.rend(), MatchPathSeparator()); (*basename) = std::string(it.base(), pathname.end()); (*directory) = std::string(pathname.begin(), it.base()); }