Re: sorting std::vector<string> ignoring case



On Sat, 12 May 2007 03:36:33 -0300, "Cholo Lennon"
<chololennon@xxxxxxxxxxx> wrote:

I don't agree.

1st: Section 7.26 of the C99 standard refers to "Future Library Directions", this means "future decisions and uses of the Committee"

2nd: Like you appointed, Section 7.26.11 say that all names starting with 'str' are reserved. Are reserved for future use of the
Committee due to section 7.26. They are not reserved for implementors. stricmp is implemented (in this case) by Microsoft (It's not
defined by ANSI) and its name starts with 'str' so they have to use the leading underscore (names starting with underscores are
reserved for implementors).

For more information, take a look to "Rationale for International Standard - Programming Language - C"
http://www.math.utah.edu/computing/compilers/c/n897.pdf

I'll be waiting for opinions or corrections (this discussion now is about C...how about C++?)

An implementation is indeed free to use these str names (which was my point
in my "P.S." so long ago). For more, see (you might want to expand the
thread and read the messages leading to this one):

http://groups.google.com/group/comp.lang.c/msg/a3d0daa042ff50ce?hl=en&;

While _stricmp is safer in that it's future-proof WRT the standard, stricmp
is sufficient in the absence of a (future) standardized function with that
name.

--
Doug Harrison
Visual C++ MVP
.



Relevant Pages

  • Re: sorting std::vector ignoring case
    ... Are reserved for future use of the Committee due to section 7.26. ... They are not reserved for implementors. ... stricmp is implemented by Microsoft and its name starts with 'str' so they have to use the leading underscore. ...
    (microsoft.public.vc.stl)
  • Re: sorting std::vector ignoring case
    ... defined by ANSI) and its name starts with 'str' so they have to use the leading underscore (names starting with underscores are ... name it's conformant with standard. ... The name stricmp conformed just as well (all names starting with 'str' ... Adding the leading underscore accomplished ...
    (microsoft.public.vc.stl)

Loading