Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by MARIUSZ ( 14 years ago )
#include<stdio.h>
int strlen(char napis[],char wyraz[]){
int i,j=0;
for(i=0;napis[i]!='\0';++i){
if(wyraz[j]==napis[i]){
++j;
}else
j=0;
if(wyraz[j]=='\0')
return i-j+1;
}
return -1;
}
int main(){
char napis[]="Ala ma kota";
char wyraz[]="mama";
printf("%d",strlen(napis,wyraz));
}
Revise this Paste