Skip to content

Commit 5f47b5b

Browse files
committed
fix(Basic): Added a function to get the filepath without extension of a function.
1 parent 7b6b493 commit 5f47b5b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/geode/basic/filename.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ namespace geode
3232

3333
std::string opengeode_basic_api filename_without_extension(
3434
absl::string_view path );
35+
36+
std::string opengeode_basic_api filepath_without_extension(
37+
absl::string_view path );
3538
} // namespace geode

src/geode/basic/filename.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,10 @@ namespace geode
3838
ghc::filesystem::path filepath{ to_string( path ) };
3939
return filepath.filename().replace_extension( "" ).string();
4040
}
41+
42+
std::string filepath_without_extension( absl::string_view path )
43+
{
44+
ghc::filesystem::path filepath{ to_string( path ) };
45+
return filepath.replace_extension( "" ).string();
46+
}
4147
} // namespace geode

0 commit comments

Comments
 (0)