On Thursday, 6 June 2013 at 17:48:59 UTC, Steven Schveighoffer wrote:
On Thu, 06 Jun 2013 13:40:37 -0400, Lars T. Kyllingstad <[email protected]> wrote:

On Thursday, 6 June 2013 at 17:28:56 UTC, Steven Schveighoffer wrote:

Great! I'd highly suggest pathEqual which takes two ranges of dchar and does the composition and OS-specific comparison for you.

They don't have to be dchar if all the building blocks are templates (as the existing ones are):

bool pathEqual(CaseSensitive cs = CaseSensitive.osDefault, C1, C2)
              (const(C1)[] p1, const(C2)[] p2)
    if (isSomeChar!C1 && isSomeChar!C2)

Actually, all string variants are dchar ranges :) And your solution is less general, dchar ranges don't have to be arrays.

Ok, now I see what you meant.

However, I don't think in practice there are any real non-array dchar ranges...

At least not any that also support slicing, which I think it is fair to require of "path ranges".

Reply via email to