2
0

strcspn.c 227 B

12345678910
  1. #include <string.h>
  2. #include <stdio.h>
  3. #include "test_helpers.h"
  4. int main(void) {
  5. char *world = "world";
  6. printf("%ld\n", strcspn("hello", world)); // should be 2
  7. printf("%ld\n", strcspn("banana", world)); // should be 6
  8. }