Something in C++ similar to SQL LIKE?

Is there a function in C++ that is similar to the SQL LIKE operator? something in c++ that could do this...

1
2
3
char name = var123;
if(name like '%123') // would return
return;
yes via the string class:

see these vids (start from lesson 69/70 where hes starts talking about them). they are 10min vids by the way

http://www.youtube.com/watch?v=nkKeA74p3RY&feature=relmfu
would some1 post an example of what it would be like in c++?

edit: also, how would i be able to do the above while using an int value??
Last edited on
You could use strncmp(), strnicmp(), TR1 regular expressions, or the std::string find() method. Google for any of those.
Topic archived. No new replies allowed.