strstr.c 368 B

123456789101112
  1. #include <string.h>
  2. #include <stdio.h>
  3. int main(void) {
  4. printf("%s\n", strstr("In relibc we trust", "rust"));
  5. printf("%s\n", strstr("In relibc we trust", "libc"));
  6. printf("%s\n", strstr("In relibc we trust", "bugs"));
  7. printf("%s\n", strstr("IN RELIBC WE TRUST", "rust"));
  8. printf("%s\n", strcasestr("IN RELIBC WE TRUST", "rust"));
  9. return 0;
  10. }