deps/kb_meme/meme-5.0.1/src/buffer.c
/*
 * buf_find_next
 * returns the position of the next delimiter or -1 if it is not found, 
 * does not change the buffer in any way.
 *
 * Determines where the next delimiter is by calling is_delim with the 
 * passed config on each sequential character and negating the function's
 * output if negate_is_delim is set.
 *
 * see the helper function buf_is_delim_letter
 */
buf_find_next
returns the position of the next delimiter or -1 if it is not found,
does not change the buffer in any way.

Determines where the next delimiter is by calling is_delim with the
passed config on each sequential character and negating the function's
output if negate_is_delim is set.

see the helper function buf_is_delim_letter
buf_find_next returns the position of the next delimiter or - 1 if it is not found does not change the buffer in any way . Determines where the next delimiter is by calling is_delim with the passed config on each sequential character and negating the function ' s output if negate_is_delim is set . see the helper function buf_is_delim_letter
int buf_find_next(BUF_T *buf, int (*is_delim)(void*, int), void* config, bool negate_is_delim) {
  int i, j;
  if (negate_is_delim) {
    for (i = buf->position; i < buf->limit; ++i) {
      if (!is_delim(config, (buf->buffer)[i])) {
        return i;
      }
    }
  } else {
    for (i = buf->position; i < buf->limit; ++i) {
      if (is_delim(config, (buf->buffer)[i])) {
        return i;
      }
    }
  }
  return -1;
}
int buf_find_next ( BUF_T * buf , int ( * is_delim ) ( void * , int ) , void * config , bool negate_is_delim ) { int i , j ; if ( negate_is_delim ) { for ( i = buf -> position ; i < buf -> limit ; ++ i ) { if ( ! is_delim ( config , ( buf -> buffer ) [ i ] ) ) { return i ; } } } else { for ( i = buf -> position ; i < buf -> limit ; ++ i ) { if ( is_delim ( config , ( buf -> buffer ) [ i ] ) ) { return i ; } } } return -1 ; }
buf_find_next
 returns the position of the next delimiter or -1 if it is not found,
 does not change the buffer in any way.
buf_find_next returns the position of the next delimiter or - 1 if it is not found does not change the buffer in any way .
//look for a delimiter or the end