Re: [patch libiberty include]: Add additional helper functions for directory-separator searching

Eli Zaretskii
2011-03-08T19:54:36Z

> Date: Tue, 8 Mar 2011 19:51:14 +0100
> From: Kai Tietz <ktietz70@googlemail.com>
> Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org,
> gcc-patches@gcc.gnu.org, binutils@sourceware.org
>
> > In my experience, the strchr analog is not needed, only the strrchr
> > one (which could be used quite a lot). Â The few places that use strchr
> > now should actually be rewritten to search from the end, because
> > that's what they need.
> >
>
> Here I am not that sure. For example in gcc's gengtype.c
> (read_input_list) is a use-case for strchr on filenames, which can't
> be expressed by strrchr.

I don't see any reason to have in libiberty a function that has a
single use.