extension.h 787 B

123456789101112131415161718192021222324252627282930
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2020 Alec Jacobson <[email protected]>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_EXTENSION_H
  9. #define IGL_EXTENSION_H
  10. #include "igl_inline.h"
  11. #include <string>
  12. namespace igl
  13. {
  14. /// Extract file extension from path.
  15. ///
  16. /// @param[in] path path with an extension (path/to/foo.obj)
  17. /// @return extension without dot (obj)
  18. ///
  19. /// \see pathinfo, basename, dirname
  20. IGL_INLINE std::string extension( const std::string & path);
  21. }
  22. #ifndef IGL_STATIC_LIBRARY
  23. # include "extension.cpp"
  24. #endif
  25. #endif