QMCPACK
FileUtility.h File Reference
+ Include dependency graph for FileUtility.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string_view getExtension (const std::string_view str)
 

Function Documentation

◆ getExtension()

std::string_view getExtension ( const std::string_view  str)
inline

Definition at line 19 of file FileUtility.h.

Referenced by main(), and TEST_CASE().

20 {
21  size_t pos = str.find_last_of('.');
22  if (pos == std::string_view::npos)
23  return std::string_view();
24  return str.substr(pos + 1);
25 }