Segment2.withoutExtension

Returns the file base name, excluding the extension.

struct Segment2
@safe @property const nothrow @nogc
withoutExtension
()

Examples

assert(PosixPath("/foo/bar.txt").head2.withoutExtension.equal("bar"));
assert(PosixPath("/foo/bar").head2.withoutExtension.equal("bar"));
assert(PosixPath("/foo/.bar").head2.withoutExtension.equal(".bar"));
assert(PosixPath("/foo/.bar.txt").head2.withoutExtension.equal(".bar"));

See Also

extension

Meta