Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. case insensitive compare???

case insensitive compare???

Scheduled Pinned Locked Moved C / C++ / MFC
questiondatabaseregexhelplearning
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tryhard
    wrote on last edited by
    #1

    Hi Guys, I am retrieving a field from an Access database and then comparing it to something the user enters looking for a match. However I don't get a match if the case is different. (of course) How do I do a compare that doesnt care about the case??? or how do I change a CString var to all lower case Any help greatly appreciated. Thanks Guys, Tryhard :-)

    J J T B 4 Replies Last reply
    0
    • T Tryhard

      Hi Guys, I am retrieving a field from an Access database and then comparing it to something the user enters looking for a match. However I don't get a match if the case is different. (of course) How do I do a compare that doesnt care about the case??? or how do I change a CString var to all lower case Any help greatly appreciated. Thanks Guys, Tryhard :-)

      J Offline
      J Offline
      Jon Sagara
      wrote on last edited by
      #2

      CString::MakeLower() to make it lower case. Jon Sagara I can't think of anything original to say.

      1 Reply Last reply
      0
      • T Tryhard

        Hi Guys, I am retrieving a field from an Access database and then comparing it to something the user enters looking for a match. However I don't get a match if the case is different. (of course) How do I do a compare that doesnt care about the case??? or how do I change a CString var to all lower case Any help greatly appreciated. Thanks Guys, Tryhard :-)

        J Offline
        J Offline
        Jonas Larsson
        wrote on last edited by
        #3

        CString::CompareNoCase() might help. Tryharder next time ;p

        1 Reply Last reply
        0
        • T Tryhard

          Hi Guys, I am retrieving a field from an Access database and then comparing it to something the user enters looking for a match. However I don't get a match if the case is different. (of course) How do I do a compare that doesnt care about the case??? or how do I change a CString var to all lower case Any help greatly appreciated. Thanks Guys, Tryhard :-)

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          CString::CollateNoCase - uses current code page for comparisons. Tomasz Sowinski -- http://www.shooltz.com

          1 Reply Last reply
          0
          • T Tryhard

            Hi Guys, I am retrieving a field from an Access database and then comparing it to something the user enters looking for a match. However I don't get a match if the case is different. (of course) How do I do a compare that doesnt care about the case??? or how do I change a CString var to all lower case Any help greatly appreciated. Thanks Guys, Tryhard :-)

            B Offline
            B Offline
            Bill Wilson
            wrote on last edited by
            #5

            Look up CString class members. There is one just for this purpose. P.S. Learn to use MSDN. Its ALL in there. Hope this helps, Bill

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups