2

Possible Duplicate:
Case insensitive std::string.find()

I want to make use of the std::string::find() method in a case insensitive way. I have come across various solutions suggesting the Boost library, but that solution is not applicable in my scenario.

Are there other ways to accomplish this?

Community
  • 1
  • 1
keeda
  • 2,605
  • 5
  • 28
  • 27
  • Have you tried writing some code to do this? Or don't you know where to start? It's better to post any attempts you have made. – john Aug 17 '11 at 20:42

1 Answers1

0

If you can't modify the string, make a copy of it. Convert all chars to lowercase in the string and then use find() with a lowercase string.

Vinicius Kamakura
  • 7,665
  • 1
  • 29
  • 43