Re: [PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-12 Thread Junio C Hamano
Michael Haggerty writes: > On 09/11/2012 12:33 AM, Junio C Hamano wrote: >> Michael Haggerty writes: >> >>> +`string_list_split`, `string_list_split_in_place`:: >>> + >>> + Split a string into substrings on a delimiter character and >>> + append the substrings to a `string_list`. If `maxsp

Re: [PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-12 Thread Michael Haggerty
On 09/11/2012 12:33 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> +`string_list_split`, `string_list_split_in_place`:: >> + >> +Split a string into substrings on a delimiter character and >> +append the substrings to a `string_list`. If `maxsplit` is >> +non-negative, the

Re: [PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-10 Thread Junio C Hamano
Michael Haggerty writes: > +`string_list_split`, `string_list_split_in_place`:: > + > + Split a string into substrings on a delimiter character and > + append the substrings to a `string_list`. If `maxsplit` is > + non-negative, then split at most `maxsplit` times. Return the > +

Re: [PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-10 Thread Junio C Hamano
Michael Haggerty writes: > diff --git a/string-list.c b/string-list.c > index 5594b7d..f9051ec 100644 > --- a/string-list.c > +++ b/string-list.c > @@ -204,3 +204,52 @@ void unsorted_string_list_delete_item(struct string_list > *list, int i, int free_ > list->items[i] = list->items[list->n

[PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-10 Thread Michael Haggerty
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 separato