Juha Niskanen 47026978bf libs/libc/string: fix memmem() boundary case when needle is at end of haystack
This fixes calls like memmem("hello", 5, "lo", 2);

Also zero-length needle is deemed to exist at beginning of haystack.
This behavior matches memmem() on Linux, FreeBSD, NetBSD and OpenBSD.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2024-03-11 22:06:19 +08:00
..
2023-07-08 13:50:48 +08:00
2023-12-11 08:43:26 -08:00
2023-07-08 13:50:48 +08:00
2023-07-08 13:50:48 +08:00
2024-02-23 07:45:57 +08:00
2023-09-04 23:19:46 +08:00
2024-02-21 13:29:36 -03:00
2023-12-25 16:54:16 -03:00
2023-07-08 13:50:48 +08:00
2024-02-21 13:29:36 -03:00
2023-08-26 17:07:02 +08:00
2023-08-10 20:47:37 +08:00
2024-02-21 13:29:36 -03:00