Comparing Strings

This is a discussion on Comparing Strings within the C++ Programming forums, part of the General Programming Boards category; Is there any kind of function like strcmp() that does not take into consideration the case of the string?...

  1. #1
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

    Comparing Strings

    Is there any kind of function like strcmp() that does not take into consideration the case of the string?
    Please direct all complaints regarding this post to the nearest brick wall Have a nice day.

  2. #2
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Any of those work with MSVC++ 6.0?
    Please direct all complaints regarding this post to the nearest brick wall Have a nice day.

  3. #3
    Registered User quagsire's Avatar
    Join Date
    Jun 2002
    Posts
    60
    stricmp is part of the ansi c and ansi c++ standard. It should even work with MSVC++ 6.0!

  4. #4
    Sebastiani
    Guest

    It should even work with MSVC++ 6.0!
    ...that's asking a lot

  5. #5
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    With MFC you can use the CompareNoCase function of the CString class

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Is there any kind of function like strcmp() that does not take into consideration the case of the string?
    It shouldn't be difficult to write it yourself since any compiler specific comparison routine will not be portable.

    >stricmp is part of the ansi c and ansi c++ standard.
    My copies must be broken then, stricmp isn't mentioned in either.

    >It should even work with MSVC++ 6.0!
    Yes, this compiler does implement stricmp.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 04-29-2009, 10:13 AM
  2. Problem with comparing strings!
    By adrian2009 in forum C Programming
    Replies: 2
    Last Post: 02-28-2009, 09:44 PM
  3. comparing strings using argv
    By eth0 in forum C Programming
    Replies: 2
    Last Post: 09-20-2005, 09:20 AM
  4. comparing strings
    By infinitum in forum C++ Programming
    Replies: 1
    Last Post: 05-03-2003, 12:10 PM
  5. Comparing Strings
    By Perica in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2003, 10:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21