Empresa engajada
to test if a string is a substring of another one
Sigiloso
s2 is a substring of s1 if the following are true C: strstr(s1,s2) != NULL C++: s1.find(s2) != string::npos Java: s1.indexOf(s1) != -1
int substr(char s[],char d[]) { int j=0,k,l; char c; while((c=s[j++])!='\0') { k=0; if(c==d[k++]) { l=j; while(s[l]==d[k] && d[k]!='\0' && s[l]!='\0' ) { l++; k++; } if(d[k]=='\0') { return j-1; } } } return -1; }
Fique por dentro de todas as oportunidades e dicas internas seguindo as empresas de seus sonhos.
Comece a buscar vagas para receber atualizações e recomendações personalizadas.