summaryrefslogtreecommitdiff
path: root/lib/util/strv.h
Commit message (Collapse)AuthorAgeFilesLines
* lib: Fix includes in strv.hVolker Lendecke2021-04-191-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Allow parsing a strv from a non-talloc const bufVolker Lendecke2017-11-291-0/+2
| | | | | | | This will allow parsing a tdb record without having to talloc_memdup it Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* strv.c: add strv_to_env for use with execle, etc.Trever L. Adams2016-10-141-0/+1
| | | | | | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Signed-off-by: Trever L. Adams <trever.adams@gmail.com> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Oct 14 01:44:02 CEST 2016 on sn-devel-144
* lib/util: Add strv_addn()Volker Lendecke2016-02-291-0/+1
| | | | | | | | strv_addn() adds some number of characters from an existing string. This is useful for parsing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* Revert "lib/util: Expose strv_addn() for adding string with specified length"Martin Schwenke2016-02-291-1/+0
| | | | | | | | | | | | | | This reverts commit 0c61dd15137b4603bd47b3d6ae18ded6bd18ffae. The intention of strv_addn() is to be able to add some number of characters from an existing string. This implementation carelessly assumes that the old _strv_append() added the trailing NUL to form a valid strv. That's not true. New implementation to follow. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/util: Expose strv_addn() for adding string with specified lengthMartin Schwenke2016-02-251-0/+1
| | | | | | | | | | | | This is just a rename of previously static function _strv_append(). strv is now more useful for parsing. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Feb 25 13:43:31 CET 2016 on sn-devel-144
* lib: Add "strv" string handling routinesVolker Lendecke2014-12-161-0/+32
This is a little set of routines designed after the glibc argz routines. It is supposed to eventually replace our inefficient string_list routines. A talloc blob is an array of strings separated by the \0 character. See argz(3) on a Linux system for the ideas where this came from. Based on talloc strv is simpler because talloc knows about the size of the blob, so we don't have to explicitly maintain it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>