]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lib/libc/amd64/string: implement strsep() through strcspn()
authorRobert Clausecker <fuz@FreeBSD.org>
Tue, 24 Oct 2023 03:52:01 +0000 (23:52 -0400)
committerRobert Clausecker <fuz@FreeBSD.org>
Mon, 25 Dec 2023 13:55:30 +0000 (14:55 +0100)
commitfd2ecd91aeeeab579c769c9a39f90b4bd4a493a9
tree114dda481ab140d00a8123a53cf910b710898c69
parentdd1c2e887c1fa087bf15cbf7f0bdc35b7875bdd6
lib/libc/amd64/string: implement strsep() through strcspn()

The strsep() function is basically strcspn() with extra steps.
On amd64, we now have an optimised implementation of strcspn(),
so instead of implementing the inner loop manually, just call
into the optimised routine.

Sponsored by: The FreeBSD Foundation
Tested by: developers@, exp-run
Approved by: mjg
MFC after: 1 month
MFC to: stable/14
PR: 275785
Differential Revision: https://reviews.freebsd.org/D42346
lib/libc/amd64/string/Makefile.inc
lib/libc/amd64/string/strsep.c [new file with mode: 0644]