Logo Search packages:      
Sourcecode: bglibs version File versions

int str_cmpb ( const str a,
unsigned  offset,
const char *  b,
unsigned  len 
)

Compare a string against a binary block.

Definition at line 40 of file cmp.c.

References len, and s.

Referenced by str_cmp(), and str_cmps().

{
  char* aptr;
  if (len + offset > a->len)
    return 1;
  for (aptr = a->s+offset; len; ++aptr, ++b, --len)
    if (*b - *aptr) return *b - *aptr;
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index