From: Jason Stewart (res0054p_at_[hidden])
Date: 2002-01-31 07:48:21
At 10:04 AM 1/30/2002 -0800, you wrote:
>On 1/30/02 9:07 AM, "Matt Austern" <austern_at_[hidden]> wrote:
> > Besides, case-insensitive string comparison raises two more questions.
> > First, which locale do you do it in? The program's global locale is
> > surely the wrong answer. Second, std::ctype's mechanism for case
> > conversion isn't quite right. It assumes you can do case conversion one
> > letter at a time and it assumes that the uppercase version of a string
> > always has the same number of characters as the lowercase version. Both
> > assumptions are wrong.
>Note that in the context of path manipulation, if we compare paths at all,
>we want to compare paths just as the file system does. So we don't really
>want "case-insensitive string comparison" as such. We just want string
>comparison that exactly matches the underlying file system.
>That having been said, it is probably difficult if not impossible to do this
>for the various reasons already cited.
This is making my head hurt.
I think you're right, the right way is the way the OS does it. I'm not sure
of the best way to handle that. However, it seems important to have at
least basic comparison functionality. I often find myself wanting to put
Filenames in a std::map so would be nice to have at least have a
specialized less, similar to shared_ptr.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk