Daan De Meyer
0c15577abe
basic + fundamental: Clean up includes
...
Split out of #37344 .
2025-05-25 10:06:07 +02:00
Daan De Meyer
3b7d332047
macro: Reduce transitive includes
2025-05-09 11:33:31 +02:00
Mike Yuan
51e0149173
nulstr-util: minor cleanup
2024-03-22 01:44:45 +08:00
Yu Watanabe
a4f66f90ad
nulstr-util: introduce strv_parse_nulstr_full() that optionally drop trailing empty strings
2023-03-24 15:21:59 +09:00
Quentin Deslandes
96c648fecd
set: add set_make_nulstr
...
Add function set_make_nulstr() to create a nulstr out of a set. Behave
the same way as strv_make_nulstr().
2022-12-15 09:57:39 +00:00
Lennart Poettering
7f0f540500
nulstr-util: modernize strv_from_nulstr() a bit
2022-11-13 17:39:08 +09:00
Lennart Poettering
08af3cc5a5
strv: move nulstr utilities to nulstr-util.[ch]
...
Let's move them out of the generic, already very long strv.[ch] module
into the more specific nulst-util.[ch]
No code changes.
2022-11-13 17:39:08 +09:00
Daan De Meyer
12e2b70f9b
nulstr-util: Declare NULSTR_FOREACH() iterator inline
2022-11-11 16:31:32 +01:00
Arnaud Ferraris
533f11c529
basic: nulstr-util: add nulstr_get() returning the matching string
...
Currently `nulstr_contains` returns a boolean, making it difficult to
identify which of the input strings matches the "needle".
Adding a new `nulstr_get()` function, returning a const pointer to the
matching string, eases this process and allows us to directly re-use the
result of a call to this function without additional processing or
memory allocation.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com >
2021-09-15 16:45:58 +02:00
Yu Watanabe
db9ecf0501
license: LGPL-2.1+ -> LGPL-2.1-or-later
2020-11-09 13:23:58 +09:00
Lennart Poettering
d8b4d14df4
util: split out nulstr related stuff to nulstr-util.[ch]
2019-03-14 13:25:52 +01:00