Programa para el testeo de las funciones.
Programa para el testeo de las funciones.Para compilar o código example_ra_match.cpp:
g++ -static -o example_ra_match example_ra_match.cpp -lpdsramm
Para executar o programa:
Retornando por consola:
Found a*f in : abcdef ? 0
Found a*f in : abcdee ? 1
Found [a-z]xx in : qxx ? 0
Found [a-z]xx in : dqxx ? 1
Found a?? in : abc ? 0
Found a?? in : abcd ? 1
Código example_ra_match.cpp:
#include <Pds/Ra>
int main(void)
{
std::cout<<"Found a*f in : abcdef ? ";
std::cout<<std::endl;
std::cout<<"Found a*f in : abcdee ? ";
std::cout<<std::endl;
std::cout<<"Found [a-z]xx in : qxx ? ";
std::cout<<std::endl;
std::cout<<"Found [a-z]xx in : dqxx ? ";
std::cout<<std::endl;
std::cout<<"Found a?? in : abc ? ";
std::cout<<std::endl;
std::cout<<"Found a?? in : abcd ? ";
std::cout<<std::endl;
return 0;
}
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