hmmer-3.3/easel/esl_mem.c
/* Function:  esl_memcspn()
 * Synopsis:  Finds length of prefix consisting of anything other than given chars
 *
 * Purpose:   For line <p> of length <n>, return the length of
 *            a prefix that consists only of characters NOT in the
 *            string <disallow>. 
 */
esl_memcspn()
Synopsis:  Finds length of prefix consisting of anything other than given chars

For line  of length , return the length of
a prefix that consists only of characters NOT in the
string .
esl_memcspn () Synopsis : Finds length of prefix consisting of anything other than given chars For line of length return the length of a prefix that consists only of characters NOT in the string .
esl_pos_t
esl_memcspn(char *p, esl_pos_t n, const char *disallow)
{
  esl_pos_t so;
  for (so = 0; so < n; so++) if (strchr(disallow, p[so]) != NULL) break;
  return so;
}
esl_pos_t esl_memcspn ( char * p , esl_pos_t n , const char * disallow ) { esl_pos_t so ; for ( so = 0 ; so < n ; so ++ ) if ( strchr ( disallow , p [ so ] ) != NULL ) break ; return so ; }
Function:  esl_memcspn()
 Synopsis:  Finds length of prefix consisting of anything other than given chars
Function : esl_memcspn () Synopsis : Finds length of prefix consisting of anything other than given chars