DOKK / manpages / debian 10 / publib-dev / strdiff.3pub.en
STRDIFF(3pub) C Programmer's Manual STRDIFF(3pub)

strdiff - locate first difference between two strings

#include <publib.h>
size_t strdiff(const char *str1, const char *str2);

strdiff finds the first character from the beginning that is different in the two strings str1 and str2. The terminating zero characters are considered different.

strdiff returns a the offset of the first pair of differring characters (or the offset of the first zero character it finds).

publib(3), string(3), strcmp(3)

Lars Wirzenius (lars.wirzenius@helsinki.fi)

C Programmer's Manual Publib