stem

The name of the path without its extension.

stem
(
PathType
)
(
auto ref in PathType p
)
if (
isSomePath!PathType
)

Examples

1 assertEqual(Path().stem, ".");
2 assertEqual(Path("").stem, ".");
3 assertEqual(Path("/").stem, "");
4 assertEqual(Path("/hello").stem, "hello");
5 assertEqual(Path("C:/hello/world").stem, "world");
6 assertEqual(Path("C:/hello/world.exe").stem, "world");
7 assertEqual(Path("hello/world.foo.bar.exe").stem, "world");

Meta