3 Replies - 776 Views - Last Post: 04 May 2007 - 07:22 PM Rate Topic: -----

#1 eugene1017  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 22-April 07

String Manipulation, looping

Posted 02 May 2007 - 09:15 AM

How can I write a program code so that it allows case-insensitive comparison of two strings?

For example: "Hi" =="hi"
those two strings are the same and will return true .


I am not familiar with using string::compare() so could you help me?
Is This A Good Question/Topic? 0
  • +

Replies To: String Manipulation, looping

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: String Manipulation, looping

Posted 02 May 2007 - 09:46 AM

The .compare() method does not have a case insensitive option...you can convert both strings to one case or the other for case insensitivity - check out the following article.

http://www.informit....p...um=194&rl=1
Was This Post Helpful? 0
  • +
  • -

#3 eugene1017  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 22-April 07

Re: String Manipulation, looping

Posted 02 May 2007 - 01:12 PM

View PostAmadeus, on 2 May, 2007 - 09:46 AM, said:

The .compare() method does not have a case insensitive option...you can convert both strings to one case or the other for case insensitivity - check out the following article.

http://www.informit....p...um=194&rl=1



thank you for your help
I will try to write a code myself and ask for help if i need it
Was This Post Helpful? 0
  • +
  • -

#4 eugene1017  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 22-April 07

Re: String Manipulation, looping

Posted 04 May 2007 - 07:22 PM

no more help needed

This post has been edited by eugene1017: 04 May 2007 - 07:48 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1