PathCommon.opCmp

Undocumented in source. Be warned that the author may not have intended to support it.
mixintemplate PathCommon(TheStringType, alias theSeparator, alias theCaseSensitivity)
const
int
opCmp
(
ref const PathType other
)
if (
isSomeString!TheStringType &&
isSomeString!(typeof(theSeparator))
)

Examples

assertEqual(PathType(""), PathType(""));
assertEqual(PathType("."), PathType(""));
assertEqual(PathType(""), PathType("."));
auto p1 = PathType("/hello/world");
auto p2 = PathType("/hello/world");
assertEqual(p1, p2);
static if(is(PathType == WindowsPath))
{
  auto p3 = PathType("/hello/world");
}
else static if(is(PathType == PosixPath))
{
  auto p3 = PathType("/hello\\world");
}
auto p4 = PathType("/hello\\world");
assertEqual(p3, p4);

Meta