Home | Develop | Download | Contact
example_ra_match.cpp
1
25#include <Pds/Ra>
26
27int main(void)
28{
29 std::cout<<"Found a*f in : abcdef ? ";
30 std::cout<<Pds::Ra::FnMatch("a*f","abcdef",Pds::Ra::FNM_CASEFOLD);
31 std::cout<<std::endl;
32
33 std::cout<<"Found a*f in : abcdee ? ";
34 std::cout<<Pds::Ra::FnMatch("a*f","abcdee",Pds::Ra::FNM_CASEFOLD);
35 std::cout<<std::endl;
36
37 std::cout<<"Found [a-z]xx in : qxx ? ";
38 std::cout<<Pds::Ra::FnMatch("[a-z]xx","qxx",Pds::Ra::FNM_CASEFOLD);
39 std::cout<<std::endl;
40
41 std::cout<<"Found [a-z]xx in : dqxx ? ";
42 std::cout<<Pds::Ra::FnMatch("[a-z]xx","dqxx",Pds::Ra::FNM_CASEFOLD);
43 std::cout<<std::endl;
44
45 std::cout<<"Found a?? in : abc ? ";
46 std::cout<<Pds::Ra::FnMatch("a??","abc",Pds::Ra::FNM_CASEFOLD);
47 std::cout<<std::endl;
48
49 std::cout<<"Found a?? in : abcd ? ";
50 std::cout<<Pds::Ra::FnMatch("a??","abcd",Pds::Ra::FNM_CASEFOLD);
51 std::cout<<std::endl;
52
53 return 0;
54}
55
int FnMatch(const std::string &pattern, const std::string &string, int flags)
función similar a fnmatch(), creada para tener compatibilidad en MinGw (code From FreeBSD fnmatch....
const unsigned int FNM_CASEFOLD
Definition: RaMatch.hpp:101

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed