strdiff(3pub)

strdiff3pub

Locate first difference between two strings

Usage

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

Overview

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.

Return value

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

Releases

16 releases since Debian 1.2 (Rex); the text changed 4 times.

  1. 1.2–1.3
  2. 2.0–2.2
  3. 3.0
  4. 3.1–6.0
  5. 7–13

Author

Lars Wirzenius ([email protected])

From publib-dev 0.40-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.