]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Introduce APIs for splitting/joining strings
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 30 Nov 2012 15:21:02 +0000 (15:21 +0000)
committerEric Blake <eblake@redhat.com>
Mon, 7 Jan 2013 17:38:24 +0000 (10:38 -0700)
commitd39ef5a01f044625b518fa97f64f86239493ec97
treef3eb73478ce1e05d4dfcdcdb72147f4569551ee8
parent84cbd3a98aac26bd705801f55aac82da9c92967d
Introduce APIs for splitting/joining strings

This introduces a few new APIs for dealing with strings.
One to split a char * into a char **, another to join a
char ** into a char *, and finally one to free a char **

There is a simple test suite to validate the edge cases
too. No more need to use the horrible strtok_r() API,
or hand-written code for splitting strings.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 76c1fd33c8093d6a7173a85486e1e6f51a832135)

Conflicts:
tests/Makefile.am - commit eca72d4 not backported
.gitignore
src/Makefile.am
src/libvirt_private.syms
src/util/virstring.c [new file with mode: 0644]
src/util/virstring.h [new file with mode: 0644]
tests/Makefile.am
tests/virstringtest.c [new file with mode: 0644]