1*0a6a1f1dSLionel Sambuc #include <string.h> 2*0a6a1f1dSLionel Sambuc 3*0a6a1f1dSLionel Sambuc int main(void)4*0a6a1f1dSLionel Sambucmain(void) 5*0a6a1f1dSLionel Sambuc { 6*0a6a1f1dSLionel Sambuc char buf[6] = "aybxc"; 7*0a6a1f1dSLionel Sambuc char *workp = buf; 8*0a6a1f1dSLionel Sambuc char *retp = strsep(&workp, "xy"); 9*0a6a1f1dSLionel Sambuc return( ! (retp == buf && '\0' == buf[1] && buf + 2 == workp)); 10*0a6a1f1dSLionel Sambuc } 11