string_list: add two new functions for splitting strings
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 12 Sep 2012 14:04:43 +0000 (16:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 18:43:24 +0000 (11:43 -0700)
commitff919f965d20d003e3882c70de667f41a86349ac
treeb63a1df5b8aeebaee410c4d39bf838ea65e16786
parente448fed8e6ba9cd9237b7c8045c11cc40afc8595
string_list: add two new functions for splitting strings

Add two new functions, string_list_split() and
string_list_split_in_place().  These split a string into a string_list
on a separator character.  The first makes copies of the substrings
(leaving the input string untouched) and the second splits the
original string in place, overwriting the separator characters with
NULs and referring to the original string's memory.

These functions are similar to the strbuf_split_*() functions except
that they work with the more powerful string_list interface.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore
Documentation/technical/api-string-list.txt
Makefile
string-list.c
string-list.h
t/t0063-string-list.sh [new file with mode: 0755]
test-string-list.c [new file with mode: 0644]