/* * Copyright (C) 1991, 1992 Linus Torvalds */ #include /** * strpbrk - Find the first occurrence of a set of characters * @cs: The string to be searched * @ct: The characters to search for */ char *strpbrk(const char * cs,const char * ct) { const char *sc1,*sc2; for( sc1 = cs; *sc1 != '\0'; ++sc1) { for( sc2 = ct; *sc2 != '\0'; ++sc2) { if (*sc1 == *sc2) return (char *) sc1; } } return NULL; } /* * Local variables: * mode: C * c-file-style: "BSD" * c-basic-offset: 8 * tab-width: 8 * indent-tabs-mode: t * End: */