man rbuf_equal (Fonctions bibliothèques) - equivalance checks for rbufs

NAME

rbuf_equal_* - equivalance checks for rbufs

SYNOPSIS

#include <roy.h>

unsigned int rbuf_equal_rbuf (const RBuf *buf1, const RBuf *buf2);

unsigned int rbuf_equal_rbufcase (const RBuf *buf1, const RBuf *buf2);

unsigned int rbuf_equal_strcase (const RBuf *buf, const char *str);

unsigned int rbuf_equal_str (const RBuf *buf, const char *str);

unsigned int rbuf_equal_data (const RBuf *buf, const char *str, const unsigned int len);

unsigned int rbuf_equal_rbuf_len (const RBuf *buf1, const RBuf *buf2, unsigned int len);

unsigned int rbuf_equal_str_len (const RBuf *buf, const char *str, unsigned int len);

DESCRIPTION

These calls do not return a distance from equal like strcmp(3), but only check to see if the two arguements are equivalant.

Calls to rbuf_equal_rbuf(3), rbuf_equal_data(3) and rbuf_equal_str(3) check to see if the two arguments are byte for byte equal.

Calls to rbuf_equal_rbufcase(3) and rbuf_equal_strcase(3) convert each byte of the two arguments to uppercase and then checks if they are equal.

rbuf_equal_rbuf_len(3) compares at most the first len bytes of each RBuf.

rbuf_equal_str_len(3) compares at most the first len bytes of the buf with str.

RETURN VALUE

Each of these call returns TRUE if the two arguments are effectivly equal. If the two arguments are not equivalant these calls return FALSE.

ERRORS

These calls never fail.

FUNCTION

The rbuf equivalance calls are implemented using functions.

SEE ALSO