On Wed, Oct 20, 2021 at 11:01 PM Graham Leggett <minf...@sharp.fm> wrote:
>
> On 20 Oct 2021, at 10:43, Yann Ylavic <ylavic....@gmail.com> wrote:
>
>> apr_strnstr() maybe, strnstr() is non-standard AFAICT and possibly not
>> available on all platforms (Windows)?
>
> This needs to be memmem really, as the boundary isn’t always a string.

+1

>
> Memmem is non portable and old versions are buggy. Is there license 
> compatibility to use this code?
>
> https://cvsweb.openbsd.org/src/lib/libc/string/memmem.c?rev=1.5

It's BSD license probably OK, otherwise there is apreq_index() here:
https://github.com/apache/apreq/blob/trunk/library/util.c#L92


Regards;
Yann.

Reply via email to