[PATCH 1/2] string: add delimiter output parameter to strsep_unescaped

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 2 04:47:18 PDT 2025


On Wed, 28 May 2025 07:58:13 +0200, Ahmad Fatoum wrote:
> strsep overwrites the found delimiter with '\0' making it cumbersome for
> callers that match on multiple delimiters to find out, which delimiter
> actually matched.
> 
> Parsers that split on multiple delimiters are likely to want support
> escaping them too, so let's add an extra output parameter to
> strsep_unescaped to make it possible to retrieve the delimiter that was
> ultimately overwritten.
> 
> [...]

Applied, thanks!

[1/2] string: add delimiter output parameter to strsep_unescaped
      https://git.pengutronix.de/cgit/barebox/commit/?id=b6f86a80f0b5 (link may not be stable)
[2/2] test: self: string: add test cases for strsep_unescaped
      https://git.pengutronix.de/cgit/barebox/commit/?id=7c75114a99f2 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list