]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/string/strtok/: strsep2ls(), STRSEP2LS(): Add APIs
authorAlejandro Colomar <alx@kernel.org>
Fri, 6 Dec 2024 21:00:43 +0000 (22:00 +0100)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Sat, 7 Jun 2025 14:52:03 +0000 (16:52 +0200)
commit2af9f9d012d3d97430a5f7fa20ab77ea2cb21ed5
tree198012347afbdae402a68a0cda854f274c0429a2
parent4e64ef699373c32e0336a53f2d6f0718279ddb5b
lib/string/strtok/: strsep2ls(), STRSEP2LS(): Add APIs

This API set implements another usual loop around strsep(3).

This one implements a loop where we are interested in an arbitrary
number of fields.  For that, a NULL terminator is added at the end.
That is commonly referred to as "list".

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/string/strtok/strsep2ls.c [new file with mode: 0644]
lib/string/strtok/strsep2ls.h [new file with mode: 0644]