logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

strdiff - locate first difference between two strings

Author

       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib                                        C Programmer's Manual                                STRDIFF(3pub)

Description

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.

Name

       strdiff - locate first difference between two strings

Return Value

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

See Also

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

Synopsis

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

See Also