#include "stdio.h" #include "stdlib.h" #include "conio.h" #include "iostream" int charcount(const char* str, char ch) { int count = 0; for(int i=0;i 1) { for(int i=1;i 0) { size = Mask[0] == '*' ? charcount(Mask, '*') : charcount(Mask, '*') + 1; msk[0] = strtok(Mask, "*"); if(size > 1) { for(int i=1, j = (int)(bool)msk[0];i= ssize) { bck[counter++] = ch[i]; } } if(counter != 0) { printf("Founds: "); for(int i=0;i < counter;i++) printf("%s %c ", bck[i], i == counter - 1 ? '\n' : '|'); } else { printf("It is not contains.\n"); } free(ch); free(bck); free(msk); do { printf("\nDo you want to try it one more time? y/n : "); yesno = tolower(getch()); printf("%c", yesno); if(yesno == 'y') goto point; } while (yesno != 'y' && yesno != 'n'); }