View Single Post
Old 01-14-2018, 12:40 AM   #80
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Experimenting:
PHP Code:
pama "ak";
printf("---------\n");
printf("0 - %c\n"str_getchar(pama,0));
printf("1 - %c\n"str_getchar(pama,1));
match("a","abcdefg") ? printf("Found 1\n");
match("k","abcdefg") ? printf("Found 2\n");
match("*a*","abcdefg") ? printf("Found 3 - correct\n");
match("*k*","abcdefg") ? printf("Found 4\n");
match("*%s*","abcdefg",str_getchar(pama,0)) ? printf("Found 5 - incorrect\n");
match("*%s*","abcdefg",str_getchar(pama,1)) ? printf("Found 6 - incorrect\n");
match("*%{str_getchar(pama,0)}c*","abcdefg") ? printf("Found 7 - incorrect\n");
match("*%{str_getchar(pama,1)}c*","abcdefg") ? printf("Found 8 - incorrect\n"); 
output:
Code:
---------
0 - a
1 - k
Found 3 - correct
Found 5 - incorrect
Found 6 - incorrect
Found 7 - incorrect
Found 8 - incorrect
fundorin is offline   Reply With Quote