At 1/29/2010 09:05 PM, you wrote: >On Fri 2010-01-29 14:56:55 UTC-0500, Rick ([email protected]) wrote: > > > I want to locate a substring within a C++ string where the case does > > not matter. I did a bunch of Google-ing and found the code below. The > > code compiles fine, but I get an error when trying to call it. > > > > This works (standard find()): pos = dateStr.find("Mon"); > > > > This gets an error (ci_find()): pos = dateStr.ci_find("Mon"); > > > > The error I get is: 'struct std::string' has no member named 'ci_find' > > > > How do I make this a member function, or how else can I do a > > case-insensitive find? > >Your ci_find() function isn't a member of the string class. Instead >it's just a standalone function. The correct way to call it would be: > > pos = ci_find(dateStr, "Mon"); > > >------------------------------------ Got it, thank you!
~Rick
