If it DOES get implemented in Groff, please name it `.indexof`. The name
`.index` is so horribly misleading I'm almost tempted to submit a PR just
to rename it.

On Fri, 31 Jul 2020, 2:41 pm B 9, <hacke...@member.fsf.org> wrote:

> "Denis M. Wilson" <d...@oxytropis.plus.com> wrote:
>
> > Sorry, the macros I've written are .strchr and .strrchr.
> >
> > .index should not be too hard using direct method (KMP is too
> > complicated). I may have time to try, no promises...
>
> Thank you. I had a mistaken presumption that it was something people
> would've already solved as a groff macro. Unless you find it a fun
> challenge, you needn't attempt it on my behalf. It seems like the
> right solution in the long run is to implement .index in groff's C
> code.
>
> —b9
>
>

Reply via email to