Re: sorting std::vector<string> ignoring case
- From: "Cholo Lennon" <chololennon@xxxxxxxxxxx>
- Date: Fri, 11 May 2007 13:06:13 -0300
Ok, I understand your "P.S." point. You're right. Only one thing: I didn't
say that _stricmp is ANSI compatible (I'm sorry again if I wasn't very clear
or very specfic). I suggested the use of _stricmp because (like you said) its
name it's conformant with standard (because it's declared inside string.h).
Best regards
--
Cholo Lennon
Bs.As.
ARG
"Doug Harrison [MVP]" <dsh@xxxxxxxx> wrote in message news:rue643996um34ojfjc7clsq6o6tgu03mg5@xxxxxxxxxx
On Thu, 10 May 2007 11:09:06 -0300, "Cholo Lennon"has
<chololennon@xxxxxxxxxxx> wrote:
"Doug Harrison [MVP]" <dsh@xxxxxxxx> wrote in message news:gp3543tv3hm1a44ihbh67e6lbfvtjo4321@xxxxxxxxxx
On Wed, 9 May 2007 00:18:22 -0300, "Cholo Lennon" <chololennon@xxxxxxxxxxx>
wrote:
I'm sorry for my wrong expression, with 'portable' I wanted to say ANSI compatible. Also I didn't say that the original names
been removed. They exist yet. Still is valid to use them in VC8 but, like you appointed, they are deprecated.
This is extremely nitpicking, but I believe stricmp and _stricmp are
equally "ANSI compatible", and I gave the reason in the "P.S." part of my
last message. I think the important point is to realize that while declared
in <string.h>, neither are Standard C functions.
Am I missing something? I don't see stricmp in the C89/C99/C++ 98 standards
I thought you were saying to avoid stricmp because it isn't "ANSI
compatible" and to use _stricmp because it is. Indeed, the latter is "ANSI
compatible" in the sense that it is an implementation-defined non-standard
function that begins with an underscore. But in an "extremely nitpicking"
way, so is stricmp, for the reasons I gave in the "P.S." part of my earlier
message. However, like I said, "neither are Standard C functions". There's
no contradiction, as "ANSI compatible" does not imply "standard library
function"; the former just means "does not violate the standard". So, you
really don't need to choose _stricmp over stricmp for reasons of
"portability" or "ANSI compatibility". The real reason is that MS has made
stricmp deprecated. Also, if you compile with /Za, which #define __STDC__
for .c files, and I don't know anyone who does or ever has <g>, MS has
chosen to make stricmp go away, even though they could have left it alone
and still been "ANSI compatible".
--
Doug Harrison
Visual C++ MVP
.
- Follow-Ups:
- Re: sorting std::vector<string> ignoring case
- From: Jerry Coffin
- Re: sorting std::vector<string> ignoring case
- References:
- 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: Cholo Lennon
- Re: sorting std::vector<string> ignoring case
- From: Doug Harrison [MVP]
- Re: sorting std::vector<string> ignoring case
- From: Cholo Lennon
- Re: sorting std::vector<string> ignoring case
- From: Doug Harrison [MVP]
- Re: sorting std::vector<string> ignoring case
- From: Cholo Lennon
- Re: sorting std::vector<string> ignoring case
- From: Doug Harrison [MVP]
- sorting std::vector<string> ignoring case
- Prev by Date: Re: sorting std::vector<string> ignoring case
- Next by Date: Re: sorting std::vector<string> ignoring case
- Previous by thread: Re: sorting std::vector<string> ignoring case
- Next by thread: Re: sorting std::vector<string> ignoring case
- Index(es):
Relevant Pages
|
Loading