sorting std::vector<string> ignoring case
- From: "Ed" <jag_manR__EM*-0_V_E653@xxxxxxxxxxxxx>
- Date: Tue, 8 May 2007 09:20:20 -0700
I need to sort a vector of strings ignoring case while preserving it.
That is, if I have a vector containing "Xyz" and "abc" I
want to report "abc" "Xyz". I can think of several inelegant ways,
such as creating a second vector with all upper (or lower)
and sort it while saving the sort order in an integer array, using the
latter to index the while reporting the original vector...
that is, an indirect sort. But I was wondering if there was some why
of accomplishing this more directly with the
STL algorithms.
Any thoughts?
TIA
Ed
.
- Follow-Ups:
- Re: sorting std::vector<string> ignoring case
- From: Daniel Lidström
- Re: sorting std::vector<string> ignoring case
- From: Ed
- Re: sorting std::vector<string> ignoring case
- From: Darko Miletic
- Re: sorting std::vector<string> ignoring case
- From: Doug Harrison [MVP]
- Re: sorting std::vector<string> ignoring case
- Prev by Date: Re: using a list in VC++ v6
- Next by Date: Re: sorting std::vector<string> ignoring case
- Previous by thread: using a list in VC++ v6
- Next by thread: Re: sorting std::vector<string> ignoring case
- Index(es):
Relevant Pages
|
Loading