Function filename

Synopsis

#include <include/fsutil.hpp>

wstring filename(const wstring &path, bool ext=false)

Description

No description yet.

Source

Lines 56-60 in src/fsutil.cpp. Line 41 in include/fsutil.hpp.

wstring fsutil::filename( const wstring& path, bool ext ) {
    size_t start = path.find_last_of( L"/\\" ) + 1;
    size_t end = ext ? path.size() : path.find_last_of( L'.' );
    return path.substr( start, end - start ); //RVO :)
}





Add Discussion as Guest

Log in