Guest User

Untitled

a guest
Apr 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. const char* BuildPath( const char* base, const char* game, const char* relativePath ) {
  2. static char szPath[260];
  3.  
  4. std::fill( std::begin( szPath ), std::end( szPath ), 0 );
  5. // Махинации с путями
  6. sprintf_s( szPath, _countof( szPath ), "%s/%s/%s", base, game, relativePath );
  7.  
  8. std::replace( std::begin( szPath ), std::end( szPath ), '\', '/' );
  9. std::transform( std::begin( szPath ), std::end( szPath ), std::begin( szPath ),
  10. [] ( unsigned char c ) { return ::tolower( c ); } ); //4996
  11. return szPath;
  12. }
Add Comment
Please, Sign In to add comment