Terra/resource/ResourceHelper.cpp
String GetResourcePath(std::vector<String> path_hierarchy)
{
    assert(path_hierarchy.empty() == false &&
           std::all_of(path_hierarchy.begin(),
                       path_hierarchy.end(),
                       [](auto const &x) { return x.size() > 0; }
                       ));
    
    String concat;
    
    for(auto x: path_hierarchy) {
        if(x.front() != L'/' && x.front() != L'\\') {
            x = L'/' + x;
        }
        if(x.back() == L'/' || x.back() == L'\\') {
            x.pop_back();
        }
        
        concat += x;
    }
    
    return GetResourcePath(concat);
}
//! Get resource file path specified by the path hierarchy.
Get resource file path specified by the path hierarchy.
Get resource file path specified by the path hierarchy .
String GetResourcePath(std::vector<String> path_hierarchy)
{
    assert(path_hierarchy.empty() == false &&
           std::all_of(path_hierarchy.begin(),
                       path_hierarchy.end(),
                       [](auto const &x) { return x.size() > 0; }
                       ));
    String concat;
    for(auto x: path_hierarchy) {
        if(x.front() != L'/' && x.front() != L'\\') {
            x = L'/' + x;
        }
        if(x.back() == L'/' || x.back() == L'\\') {
            x.pop_back();
        }
        concat += x;
    }
    return GetResourcePath(concat);
}
String GetResourcePath ( std :: vector < String > path_hierarchy ) { assert ( path_hierarchy . empty ( ) == false && std :: all_of ( path_hierarchy . begin ( ) , path_hierarchy . end ( ) , [ ] ( auto const & x ) { return x . size ( ) > 0 ; } ) ) ; String concat ; for ( auto x : path_hierarchy ) { if ( x . front ( ) != L' ' && x . front ( ) != L' \\ ' ) { x = L' ' + x ; } if ( x . back ( ) == L' ' || x . back ( ) == L' \\ ' ) { x . pop_back ( ) ; } concat += x ; } return GetResourcePath ( concat ) ; }
Get resource file path specified by the path hierarchy.
Get resource file path specified by the path hierarchy .