stem

The name of the path without its extension.

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

Examples

assertEqual(Path().stem, ".");
assertEqual(Path("").stem, ".");
assertEqual(Path("/").stem, "");
assertEqual(Path("/hello").stem, "hello");
assertEqual(Path("C:/hello/world").stem, "world");
assertEqual(Path("C:/hello/world.exe").stem, "world");
assertEqual(Path("hello/world.foo.bar.exe").stem, "world");

Meta