2
0

strspn.c 270 B

12345678910
  1. #include <string.h>
  2. #include <stdio.h>
  3. int main(int argc, char* argv[]) {
  4. printf("%lu\n", strspn("hello", "hello")); // should be 5
  5. printf("%lu\n", strspn("world", "wendy")); // should be 1
  6. printf("%lu\n", strspn("banana", "apple")); // should be 0
  7. return 0;
  8. }