libopenfpga/libopenfpgautil/src/openfpga_digest.cpp
/******************************************************************** 
 * Extract full file name from a full path of file 
 * For example: <dir_path>/<file_name>
 * This function will return <file_name>
 ********************************************************************/
Extract full file name from a full path of file
For example: /
This function will return 
Extract full file name from a full path of file For example : / This function will return
std::string find_path_file_name(const std::string& file_name) {
  char back_slash = '/';
#ifdef _WIN32
  char back_slash = '\\';
#endif 
  size_t found = file_name.rfind(back_slash);
  if (found != std::string::npos) {
    return file_name.substr(found + 1);
  }
  return file_name;
}
std :: string find_path_file_name ( const std :: string & file_name ) { char back_slash = ' ' ; #ifdef _WIN32 char back_slash = ' \\ ' ; #endif size_t found = file_name . rfind ( back_slash ) ; if ( found != std :: string :: npos ) { return file_name . substr ( found + 1 ) ; } return file_name ; }
Extract full file name from a full path of file
 For example: <dir_path>/<file_name>
 This function will return <file_name>
Extract full file name from a full path of file For example : <dir_path > / <file_name > This function will return <file_name >
/* For windows OS, replace any '/' with '\' */ /* Find the last '/' in the string and return the left part */ /* Not found. The input is the file name! Return the original string */