示例#1
0
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()
		);
	}
示例#3
0
文件: File.hpp 项目: antgar/rtype_cpp
  std::string		getBasename()
  {
    return std::string(std::find_if((this->_fullpath).rbegin(), (this->_fullpath).rend(),
				    MatchPathSeparator()).base(),
		       (this->_fullpath).end());
  }
示例#4
0
	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());
	}