1*7c3d14c8STreehugger Robot // RUN: %clang %s -o %t && %run %t 2>&1 2*7c3d14c8STreehugger Robot 3*7c3d14c8STreehugger Robot #include <assert.h> 4*7c3d14c8STreehugger Robot #include <string.h> 5*7c3d14c8STreehugger Robot main(int argc,char ** argv)6*7c3d14c8STreehugger Robotint main(int argc, char **argv) { 7*7c3d14c8STreehugger Robot size_t r; 8*7c3d14c8STreehugger Robot char s1[] = "ad"; 9*7c3d14c8STreehugger Robot char s2[] = "cd"; 10*7c3d14c8STreehugger Robot r = strcspn(s1, s2); 11*7c3d14c8STreehugger Robot assert(r == 1); 12*7c3d14c8STreehugger Robot return 0; 13*7c3d14c8STreehugger Robot } 14