>>strcmp(); makes it alot easier to compare 2 strings

This is a discussion on >>strcmp(); makes it alot easier to compare 2 strings within the C++ Programming forums, part of the General Programming Boards category; Does strcmp() take into account the case difference?...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    11

    >>strcmp(); makes it alot easier to compare 2 strings

    Does strcmp() take into account the case difference?

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    11

    Unhappy

    OOOPPPS sorry new to posting supposed to be reply not new post....

  3. #3
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    Re: >>strcmp(); makes it alot easier to compare 2 strings

    Originally posted by Waspntr
    Does strcmp() take into account the case difference?
    Yes, it sure does. If you dont want to compare strings and take case difference into account, use strcmpi().

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    >> use strcmpi().

    typo? its stricmp()
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  5. #5
    People Love Me
    Join Date
    Jan 2003
    Posts
    412
    No, it's not a typo.

    strcmp() - Compares two strings. Case sensitive.
    strcmpi() - Compares two strings. Not case sensitive.

  6. #6
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    Oh, there is a strcmpi(), ive always used stricmp()
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  7. #7
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    >>typo? its stricmp()
    Nope, some compilers use strcmpi, some use stricmp. Non standard functions are weird like that :-)
    *Cela*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Easier way of concatenating a lot of strings?
    By Evenstevens in forum C Programming
    Replies: 2
    Last Post: 05-09-2009, 01:29 PM
  2. Comparing Strings
    By Perica in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2003, 10:41 PM
  3. finding strings in strings
    By watshamacalit in forum C Programming
    Replies: 14
    Last Post: 01-11-2003, 12:08 AM
  4. compare contents of strings
    By Max in forum C Programming
    Replies: 2
    Last Post: 10-26-2002, 06:28 PM
  5. how do i compare strings
    By bart in forum C++ Programming
    Replies: 17
    Last Post: 08-30-2001, 09:17 PM

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