GenericPath.byPrefix

Iterates over the path by segment, each time returning the sub path leading to that segment.

struct GenericPath(F)
@safe @property const nothrow @nogc
byPrefix
()

Examples

assert(InetPath("foo/bar/baz").byPrefix
	.equal([
		InetPath("foo/"),
		InetPath("foo/bar/"),
		InetPath("foo/bar/baz")
	]));

assert(InetPath("/foo/bar").byPrefix
	.equal([
		InetPath("/"),
		InetPath("/foo/"),
		InetPath("/foo/bar"),
	]));

Meta