include/llfio/v2.0/path_view.hpp
//! Returns a view of the filename without any file extension
Returns a view of the filename without any file extension
Returns a view of the filename without any file extension
LLFIO_PATH_VIEW_CONSTEXPR path_view_component stem() const noexcept
  {
    auto self = _filename();
    return self._invoke([self](const auto &v) {
      auto dot_idx = v.rfind('.');
      if(_npos == dot_idx || dot_idx == 0 || (dot_idx == 1 && v[dot_idx - 1] == '.'))
      {
        return self;
      }
      return path_view_component(v.data(), dot_idx, not_zero_terminated);
    });
  }
LLFIO_PATH_VIEW_CONSTEXPR path_view_component stem ( ) const noexcept { auto self = _filename ( ) ; return self . _invoke ( [ self ] ( const auto & v ) { auto dot_idx = v . rfind ( ' ' ) ; if ( _npos == dot_idx || dot_idx == 0 || ( dot_idx == 1 && v [ dot_idx - 1 ] == ' ' ) ) { return self ; } return path_view_component ( v . data ( ) , dot_idx , not_zero_terminated ) ; } ) ; }
Returns a view of the filename without any file extension
Returns a view of the filename without any file extension