Subject: Re: RFC: memmem(3)
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Martin Husemann <martin@duskware.de>
List: tech-userlevel
Date: 03/02/2003 20:38:53
On Sun, Mar 02, 2003 at 12:22:37PM -0500, der Mouse wrote:

> + searching is usually much faster

That was my first thought too - if something needs this, it would probably
better use some more clever algorithm, like Rabin/Karp or Knuth/Morris/Pratt
(with similar interface changes as you describe).

Is it realy a good idea to add a seldom needed function and force a brute
force implementation via interface restrictions? Does this realy belong in
libc? But then we probably shouldn't have strtok or strspn, if they weren't
enforced by ANSI.

Martin