This question is not about managing Windows pathnames; I used that only as a specific example of a case-insensitive string. (And I if I change the example now, a w
Hmm... I don't think string case is the only challenge you have. Let me ask you a couple of questions:
Is c:\myPath
the same as c:/myPath
? How about file:////c:/myPath
? Or how about \\myMachine\c$\myPath
?
I kind of understand where you are headed and what you want accomplished, but it just seems like you're tunnel-visioned on a simple problem - why build a framework that does what a simple .ToLower()
vs ToLower()
comparison does?
That being said, if your problem scope, in addition to the string casing, involves trying to assess absolute equality of two given paths, it makes sense to write up a class. But that would require a lot more involved solution than what you are proposing...